https://github.com/chapter-three/cthreem-pattern-lab
https://github.com/chapter-three/cthreem-pattern-lab
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chapter-three/cthreem-pattern-lab
- Owner: chapter-three
- License: gpl-2.0
- Created: 2018-06-27T22:11:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-27T22:12:32.000Z (almost 7 years ago)
- Last Synced: 2025-01-18T06:27:37.138Z (3 months ago)
- Language: PHP
- Size: 252 KB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pattern Lab for the CThreem Drupal 8 theme
This is a fork of the [Standard Edition for Drupal](https://github.com/pattern-lab/edition-php-drupal-standard), but modified to be used along side Chapter Three's [CThreem](https://github.com/chapter-three/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.
## Prerequistes
- [`composer`](https://getcomposer.org)
## First Time Install
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:
```bash
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):
```bash
mv pattern-lab/source components
ln -s components pattern-lab/source
```## Using It
After installing and committing, others cloning the repo need to run `composer install` to install dependencies.
## Helpful Commands
These are some helpful commands you can use on the command line for working with Pattern Lab.
### One line start
This will compile PL and watch for changes while running the local server:
composer start
### Generate Pattern Lab
To generate the front-end for Pattern Lab type:
php core/console --generate
### Start a server to view Pattern Lab
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](http://localhost:8080) in your browser.
### Updating Pattern Lab
composer update
## Other Documentation
- [Official Docs](http://patternlab.io/docs/index.html)
- [`pattern-lab/patternengine-twig`](https://github.com/pattern-lab/patternengine-php-twig)
- [`aleksip/plugin-data-transform`](https://github.com/aleksip/plugin-data-transform)
- [Twig templating language](http://twig.sensiolabs.org/documentation)