-
Notifications
You must be signed in to change notification settings - Fork 13
Installation
This icon set uses some tools to automate the building process. Here are the instructions for:
- svg-min, React, svg-sprite
- Go to http://nodejs.org/ and press "Install". Follow instructions.
- Open a terminal window. Change to your Gridicons git folder.
- Type
npm install -g grunt-cli
to install Grunt. - Type
npm install
to install Gridicons build libraries. - Done!
You're ready to build the set by typing grunt
in the Gridicons folder.
Note: If something doesn't work, first thing check you have grunt
and grunt-svgstore
installed (also might require grunt-svgmin
). Type npm ls
in the Gridicons folder to see the full list.
Gridicons comes with a shell-script that will make highly optimized 1:1 size PDF versions of every SVG found in svg-min
. These are not automatically make by the grunt script.
You need to have CairoSVG installed:
sudo easy_install pip
sudo pip install cairosvg
brew install cairo
To make PDF versions, open a commandline in the gridicons directory type:
sh makepdfs.sh
Now every icon in the svg-min
folder will have been converted to PDFs in the pdf
folder.
Since this script isn't automatically run by grunt
(due to the extra dependencies not installed by npm install
), we should just run this script every once in a while (when you need a PDF icon that isn't baked, basically).
Note: cairosvg
outputs its version number in the PDF files it generates. We can't turn this off. But this means if you run the script and suddenly see all the PDFs as changed when running git status
, this is likely because your version of Cairo was newer or older than the version a previous committer used. This is okay, but probably a good idea if you check you're on the newest version of Cairo:
brew update
brew upgrade cairo