Pattern Lab Node - Gulp Edition
The Gulp wrapper around Pattern Lab Node Core providing tasks to interact with the core library and move supporting frontend assets.
The Gulp Edition comes with the following components:
patternlab-node: GitHub, npm
patternengine-node-mustache: GitHub, npm
The Pattern Lab Node - Gulp Edition 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.
npm is a dependency management and package system which can pull in all of the Gulp Edition's dependencies for you. To accomplish this:
run the following
npm install from a directory containing a
package.json file will download all dependencies defined within.
The Pattern Lab Node - Gulp Edition ships with a base experience which serves as clean place to start from scratch with Pattern Lab. But if you want to get rolling with a starterkit of your own, or use the demo starterkit like the one on demo.patternlab.io, you can do so automatically at time of
npm install by adding your starterkit to the
You can also work with starterkits using the command line.
Updating Pattern Lab
To update Pattern Lab please refer to each component's GitHub repository, and the master instructions for core. The components are listed at the top of the README.
These are some helpful commands you can use on the command line for working with Pattern Lab.
Reminder: These commands assume a global installation of gulp 4.X, instead of a local installation. Depending on your preference, you may need to upgrade your global version of gulp or run with local gulp.
List all of the available commands
To list all available commands type:
npm run gulp patternlab:help
Generate Pattern Lab
To generate the front-end for Pattern Lab type:
npm run gulp patternlab:build
Watch for changes and re-generate Pattern Lab
To watch for changes, re-generate the front-end, and server it via a BrowserSync server, type:
npm run gulp patternlab:serve
BrowserSync should open http://localhost:3000 in your browser.