The Energised Agent Component Pattern Library uses Node for core processing, npm to manage project dependencies, and gulp.js to run tasks and interface with the core library. Node version 4 or higher suffices. You can follow the directions for installing Node on the Node website if you haven't done so already. Installation of Node will include npm.
It's also highly recommended that you install gulp globally.
Install git locally https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
npm
is a dependency management and package system which can pull in all of the Energised Agent Component Pattern Library's dependencies for you. To accomplish this:
-
download or
git clone
this repository to an install location. -
run the following
cd install/location - (Change directory to the root of the installed directory) npm install
Running npm install
from a directory containing a package.json
file will download all dependencies defined within.
These are some helpful commands you can use on the command line for working with Pattern Lab.
These commands assume a global installation of gulp 4.X, instead of a local installation.
To list all available commands type:
gulp patternlab:help
To generate the front-end for Energised Agent Component Pattern Library type:
gulp patternlab:build
To watch for changes, re-generate the front-end, and server it via a BrowserSync server, type:
gulp patternlab:serve
BrowserSync should open http://localhost:3000 in your browser.
Documentation on how to use/edit Components are available here http://patternlab.io/docs/index.html
-
commit changes in git
git add . git commit -m 'Add commit message here' git push origin master
-
make sure changes in the source files have been compiled to the public directory
gulp patternlab:build
-
push the changes to GitHub pages (paddeee.github.io)
cd public git add . git commit -m 'Add commit message here' git push origin master cd ..