https://github.com/willianjusten/svg-grunt-optimizer
Some tests to optimize svg using svgo, svg2png and grunt-svgstore.
https://github.com/willianjusten/svg-grunt-optimizer
Last synced: 3 months ago
JSON representation
Some tests to optimize svg using svgo, svg2png and grunt-svgstore.
- Host: GitHub
- URL: https://github.com/willianjusten/svg-grunt-optimizer
- Owner: willianjusten
- Created: 2015-07-28T16:16:30.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-11T14:26:31.000Z (over 9 years ago)
- Last Synced: 2025-01-14T20:23:25.718Z (4 months ago)
- Language: HTML
- Size: 12.5 MB
- Stars: 9
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## SVG Grunt Optimizer
Some tests to optimize svg using Grunt, svgo, svg2png and grunt-svgstore.
## Getting Started
### Installation
First of all, install the dependencies to run this boilerplate.
- [NodeJS](http://nodejs.org/)
- [GruntJs](http://gruntjs.com/)```sh
# Clone this repository
$ git clone git://github.com/willianjusten/svg-grunt-optimizer.git new_project
$ cd new_project# install dependencies
$ npm install# install svgo global in order to optimize svg
$ npm install -g svgo
```With the commands above, you have everything to start. Just paste your svg files to `original` folder.
### Folders and Files
```sh
new_project -
/build -
svg-defs.svg
/compressed -
svg images
/original
your original svg w/o optimization
/png
png generated for fallback
.gitignore
Gruntfile.js
package.json
Readme.md
```### Tasks
- `grunt`: optimize, create defs and generate png.
- `grunt shell`: optimize svg.
- `grunt svgstore`: create defs file.
- `grunt svg2png`: generate png files.### License
This tool is free and open source software, distributed under the The MIT License. So feel free to use this to create your site without linking back to me or using a disclaimer.
If you’d like to give me credit somewhere on your blog or tweet a shout out to [@willian_justen](https://twitter.com/willian_justen), that would be pretty sweet.