For any questions or help, please contact [email protected] & [email protected]
This repo is to facilitate collaboration on diagram content via git, and to create production ready SVG's.
Collaboration should happen in the source
folder, get the optimized SVG from the for-web/
folder.
SVG's should be saved from Illustrator using the following steps:
-
Save out SVG by going to File > Export > Export for Screens
-
Make sure it's exporting an SVG in the right column
-
Go to the Export Settings by clicking on the gear above the export types
- Click SVG in the left column, then reproduce these settings:
-
Save Settings and Export
@todo filenaming convention?
-
Repeat steps 1 - 5, but this time in the Export settings set "Font" to "SVG"
@todo filenaming convention
-
For a new diagram create a new folder in this project under
source/
@todo folder naming convention
-
Create a
data.yml
file and add the follow text, feel free to add any information you know:
name:
request:
alt_text:
related_products:
-
Commit update (which should run SVG optimization and add it to
for-web/
) -
Push up result
! These instructions are written for Linux and Mac
First install Node JS on your system: https://nodejs.org/en/download/
Then open a terminal window, navigate to this folder and run:
npm install
This will install the tools needed to optimize the SVGs
To enable SVG optimization on every git commit (on your machine) run these two commands in this folder from the terminal:
cp .git-hooks/* .git/hooks/
chmod +x .git/hooks/*
This adds some commands that will run pre and post git commit to automatically optimize the SVG's for you.
Run this command at any time to optimize all of the SVG's in the source/
folder, the result will be added to for-web/
:
npm run build