The Pattern Lab Standard Edition for Mustache is the evolution of Pattern Lab 1. Pattern Lab is still, at its core, a prototyping tool focused on encouraging communication between content creators, designers, devs, and clients. It combines platform-agnostic assets, like the Mustache-based patterns, with a PHP-based "builder." Pattern Lab 2 introduces the beginnings of an ecosystem that will allow teams to mix, match and extend Pattern Lab to meet their specific needs. It will also make it easier for the Pattern Lab team to push out new features. Pattern Lab Standard Edition for Mustache is just one of the four PHP-based Editions currently available.
This is an instance of the PL for Jzb1.
To use the basic features of Pattern Lab to compile patterns, you must have PHP 5.4+ installed. On Mac OS X Pattern Lab should work "out of the box." If you're on Windows you can download PHP from PHP.net. Pattern Lab comes with its own built-in web server.
Pattern Lab uses Composer to manage project dependencies. It's required if you want to install Pattern Lab using Composer's create-project
command or if you want to upgrade Pattern Lab in the future.
There are two methods for downloading and installing the Standard Edition for Mustache:
- Download a pre-built project
- Create a project based on this Edition with Composer
The fastest way to get started with Pattern Lab's Standard Edition for Mustache is to download the latest pre-built version from the releases page.
Pattern Lab uses Composer to manage project dependencies.
Please follow the directions for installing Composer on the Composer website. We recommend you install it globally.
Use Composer's create-project
command to install the Standard Edition for Mustache into a location of your choosing. To create a project do the following:
- In a terminal window navigate to where you want to install Pattern Lab
- Type
composer create-project pattern-lab/edition-mustache-standard patternlab2-example && cd $_
This will install the Standard Edition for Mustache into a directory called patternlab2-example
in your install location. When prompted choose the "demo" StarterKit. You will be automatically dropped into the project directory after the process is finished.
Note: If you clone or download this repository and use composer install
to install the project dependencies you'll need to type the following to install the demo StarterKit:
composer install-demo
Otherwise you'll have a very bare set-up of Pattern Lab.
After installing do the following to start and view Pattern Lab:
- In a terminal window navigate to the root of your project if you aren't there already
- Type
php core/console --server --with-watch
You should now be able to open http://localhost:8080 to see your generated site. Any changes you make in ./source/
will automatically rebuild your site and reload your browser.
As you get more comfortable with Pattern Lab you can integrate it with a Gulp or Grunt workflow and drop some of the native Pattern Lab features like automatic browser reload. You can also check out the list of plugins.
Obviously Pattern Lab is deeper than the install process. Check out the documentation to learn about how to use patterns, how to modify the data used to populate those patterns, and about some advanced features.
Pattern Lab 2 was a complete rewrite and reorganization of Pattern Lab 1. Learn about the changes. After installing the Standard Edition for Mustache do the following to migrate from Pattern Lab 1 to Pattern Lab 2:
- Copy
./source
from your old project to your new install - Copy
./source/_patterns/00-atoms/00-meta/_00-head.mustache
to./source/_meta/_00-head.mustache
- Copy
./source/_patterns/00-atoms/00-meta/_01-foot.mustache
to./source/_meta/_00-foot.mustache
- Copy
./source/_data/annotations.js
to./source/_annotations/annotations.js
Everything else should work without changes.
The source code for Pattern Lab 1 is still available for download.
The Standard Edition for Mustache installs the following components:
pattern-lab/core
: GitHub, Packagistpattern-lab/patternengine-mustache
: documentation, GitHub, Packagistpattern-lab/plugin-reload
: GitHub, Packagistpattern-lab/styleguidekit-assets-default
: GitHub, Packagistpattern-lab/styleguidekit-mustache-default
: GitHub, Packagist
To list all available commands type:
php core/console --help
To list the options for a particular command type:
php core/console --help --[command]