The Style Guide library is built using Gulp and will require you to have Node.js installed on your machine. You can check if you have Node.js installed by running node -v in a terminal window (the command will return a version number if it is installed).
It is suggested to install Node.js via Homebrew to avoid having to run commands as sudo.
Install Homebrew via Terminal
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Node.js via Homebrew
brew install node
Installing Style Guide
Clone style-guide via GitHub
git clone firstname.lastname@example.org:sendgrid/style-guide.git
Cd into style-guide
Install node packages
gem install scss_lint
There are a variety of gulp tasks that have been defined to help with local development of Style Guide components and the demonstration site. The npm start task combines many of the useful tasks to speed up development. It will compile all .scss and .njk files, start browser-sync to referesh your browser window as changes are made, and continue watching for changes. Errors in your stylesheets or template files can cause this task to stop.
We also include a variety of gulp taks to help with deploying Style Guide. Running npm run build will clean our dist folder, compress and concatenate all .css and .js files, optimize images, and copy over any fonts. We use the contents of the dist folder to deploy the demonstation site of Style Guide to the branch, gh-pages.