This is a fork of the Standard Edition for Drupal, but modified to be used along side Chapter Three's CThreem Drupal 8 theme.
The Standard Edition for Drupal gives developers and designers a clean and stable base from which to develop a Drupal compatible pattern library.
Typically, you'll want to have Pattern Lab files placed inside the theme in a directory called pattern-lab
. To do so (and it doesn't already exist), from the root of the theme directory:
composer create-project chapter-three/cthreem-pattern-lab pattern-lab
For convenience, it's nice to surface the pattern-lab/source
directory since you'll be working in it often. Assuming you want a directory called components
(and it doesn't already exist):
mv pattern-lab/source components
ln -s components pattern-lab/source
After installing and committing, others cloning the repo need to run composer install
to install dependencies.
These are some helpful commands you can use on the command line for working with Pattern Lab.
This will compile PL and watch for changes while running the local server:
composer start
To generate the front-end for Pattern Lab type:
php core/console --generate
You can use PHP's built-in web server to review your Pattern Lab project in a browser. In a separate window type:
php core/console --server
Then open http://localhost:8080 in your browser.
composer update