The Gulp wrapper around Pattern Lab Node Core, currently in 2.0.0-alpha, providing tasks to interact with the core library and move supporting frontend assets.
The Gulp Edition comes with the following components:
patternlab-node
: GitHub, npmpatternengine-node-mustache
: GitHub, npmpattern-lab/styleguidekit-assets-default
: GitHubpattern-lab/styleguidekit-mustache-default
: GitHub
Pattern Lab Node uses Node and npm to manage project dependencies, and gulp to run tasks and interface with core.
Please follow the directions for installing Node on the Node website. This should include npm
.
It's also highly recommended that you install gulp globally.
There are two methods for downloading and installing the Gulp Edition:
The fastest way to get started with the Gulp Edition is to download the pre-built version from the releases page. The pre-built project comes with the Default Starterkit for Mustache installed by default.
Please note: Pattern Lab Node uses npm to manage project dependencies. To upgrade the Gulp Edition or to install plug-ins you'll need to be familiar with 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:
-
download or clone this repository to an install location.
-
run the following cd install/location npm install
Running npm install
from a directory containing a package.json
file will download all dependencies defined within.
Most people want to run Pattern Lab Node standalone and not as a dependency. If you wish to install as a dependency you can do the following:
Use npm's install
command with an argument to install the Gulp Edition into a location of your choosing. In Terminal type:
cd install/location/
npm install edition-node-gulp
This will install the Gulp Edition into a directory called node_modules
in install/location/
.
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.
To list all available commands type:
gulp pl-help
To generate the front-end for Pattern Lab type:
gulp pl-build
To watch for changes, re-generate the front-end, and server it via a BrowserSync server, type:
gulp pl-serve
BrowserSync should open http://localhost:3000 in your browser.
To install a specific StarterKit from GitHub type:
npm install [starterkit-vendor/starterkit-name]
gulp patternlab:starterkit-load --kit=[starterkit-name]