Skip to content

ucla/ucla-drupal-brand-pattern-lab

Repository files navigation

This PHP Drupal edition of Pattern Lab is for UCLA's brand guidelines website.

Pattern Lab Twig Standard Edition for Drupal

The Standard Edition for Drupal gives developers and designers a clean and stable base from which to develop a Drupal compatible pattern library.

Get Started

You will need the following installed:

Run the following to install dependencies.

$ composer install

Helpful Commands

These are some helpful commands you can use on the command line for working with Pattern Lab.

One line start

This will generate Pattern Lab and start both webpack and Pattern Lab in watch mode while running the local server:

$ npm run dev

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

Render the Twig files to HTML

$ php core/console --export

Then open http://localhost:8080 in your browser.

Updating Pattern Lab

$	composer update

Webpack build

This section describes the webpack bundling tool.

Getting Started with Webpack

$ npm install

The above commands will install all dependencies. Then to produce output files, you would execute one of the following commands:

For Development (builds files, does not use watch):

$ npm run build

For Production:

$ npm run live

Output files can be found in /public/assets.

More Documentation (these don't work on BitBucket)

External Documentation

These are crucial pieces that contains documentation that is good to understand: