You'll need the following installed:
- Latest Jekyll (minimum v2.2.0):
$ gem install jekyll
- Latest Rouge:
$ gem install rouge
- Latest Sass:
$ gem install sass
- Latest Grunt CLI:
$ npm install -g grunt-cli
- Node.js and npm
Chances are you have all this already if you work on github/github
or similar projects. If you have all those set up, now you can install the dependencies:
$ npm install
$ bower install
From the Terminal, start a local Jekyll server:
$ jekyll serve
Open a second Terminal tab to automatically recompile the Sass files, run autoprefixer, and update our Primer stats file:
$ grunt watch
Alternatively, you can manually run grunt
and jekyll serve
when needed.
Use the included Grunt task to generate and publish Primer's docs to the gh-pages
branch.
$ grunt publish
This takes the _site
directory, generates it's own Git repository there, and publishes the contents to the gh-pages
branch here on GitHub. Changes are reflected in the hosted docs within a minute or so.
Released under the MIT license.