• This repository has been archived on 07/Feb/2023
  • Stars
    star
    3,055
  • Rank 14,746 (Top 0.3 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The PHP version of Pattern Lab

license Packagist Gitter

Pattern Lab Standard Edition for Mustache

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.

Demo

You can play with a demo of the front-end of Pattern Lab at demo.patternlab.io.

Requirements

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.

Installing

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

Download a pre-built project

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.

Use Composer to create a project

Pattern Lab uses Composer to manage project dependencies.

1. Install Composer

Please follow the directions for installing Composer on the Composer website. We recommend you install it globally.

2. Install the Standard Edition for Mustache

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:

  1. In a terminal window navigate to where you want to install Pattern Lab
  2. Type composer create-project pattern-lab/edition-mustache-standard patternlab2-example && cd $_
  3. When prompted, type 1 to install the demo StarterKit

This will install the Standard Edition for Mustache along with the demo StarterKit into a directory called patternlab2-example. You will be automatically dropped into patternlab2-example/ when the install 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.

Get Up and Running

After installing do the following to start and view Pattern Lab:

  1. In a terminal window navigate to the root of your project if you aren't there already
  2. 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.

More Documentation

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.

Migrating from Pattern Lab 1 to Pattern Lab 2

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:

  1. Copy ./source from your old project to your new install
  2. Copy ./source/_patterns/00-atoms/00-meta/_00-head.mustache to ./source/_meta/_00-head.mustache
  3. Copy ./source/_patterns/00-atoms/00-meta/_01-foot.mustache to ./source/_meta/_00-foot.mustache
  4. Copy ./source/_data/annotations.js to ./source/_annotations/annotations.js

Everything else should work without changes.

Need Pattern Lab 1?

The source code for Pattern Lab 1 is still available for download.

Packaged Components

The Standard Edition for Mustache installs the following components:

List All of the Available Commands and Their Options

To list all available commands type:

php core/console --help

To list the options for a particular command type:

php core/console --help --[command]

More Repositories

1

patternlab-node

The Node version of Pattern Lab
JavaScript
2,051
star
2

edition-node-gulp

ARCHIVED - The gulp wrapper around patternlab-node core, providing tasks to interact with the core library and move supporting frontend assets.
JavaScript
279
star
3

edition-php-twig-standard

Pattern Lab Standard Edition for Twig
PHP
103
star
4

patternengine-php-twig

Twig-based PatternEngine for Pattern Lab.
PHP
78
star
5

website

Pattern Lab's website: patternlab.io
HTML
57
star
6

patternengine-node-react

ARCHIVED - The React engine for Patternlab/Node
JavaScript
50
star
7

patternlab-php-core

This repository provides the core functionality for Pattern Lab. It is meant to be used from within an Edition with a PatternEngine and StarterKit.
PHP
43
star
8

edition-node-grunt

The grunt wrapper around patternlab-node core, providing tasks to interact with the core library and move supporting frontend assets.
JavaScript
38
star
9

styleguidekit-assets-default

The static assets for the default StyleguideKit for Pattern Lab. Contains styles and mark-up for Pattern Lab's front-end.
JavaScript
35
star
10

starterkit-mustache-demo

The Mustache-based demo StarterKit for Pattern Lab.
31
star
11

starterkit-mustache-bootstrap

A Bootstrap starter kit for Pattern Lab
23
star
12

patternlab-node-cli

Moved to https://github.com/pattern-lab/patternlab-node/tree/dev/packages/cli
JavaScript
21
star
13

plugin-drupal-twig-components

PHP
17
star
14

the-spec

The specification for implementing Pattern Lab in various languages. This way there can be common core functionality and common shared assets.
16
star
15

starterkit-mustache-materialdesign

A Material Design starter kit for Pattern Lab
15
star
16

plugin-php-data-inheritance

The Data Inheritance Plugin allows patterns to inherit data from patterns within its lineage.
PHP
13
star
17

starterkit-mustache-foundation

A Foundation starter kit for Pattern Lab
11
star
18

starterkit-twig-demo

Pattern Lab's Demo StarterKit for Twig.
10
star
19

starterkit-handlebars-vanilla

A vanilla starterkit that includes a basic scaffolding and a few patterns to demonstrate a full page, but not a full-blown demo
9
star
20

edition-node

ARCHIVED - The pure wrapper around Pattern Lab Node Core, the default pattern engine, and supporting frontend assets.
JavaScript
9
star
21

patternengine-node-mustache

ARCHIVED - The Mustache engine for Patternlab/Node
JavaScript
7
star
22

patternengine-node-twig

ARCHIVED - The Twig engine for Patternlab/Node
JavaScript
7
star
23

plugin-php-reload

Automatic Browser Reload Support for Pattern Lab
PHP
7
star
24

plugin-php-faker

The Faker Plugin adds Faker support to Pattern Lab.
PHP
7
star
25

styleguidekit-twig-default

The default Twig-based StyleguideKit for Pattern Lab. Contains styles and mark-up for Pattern Lab's front-end.
HTML
7
star
26

starterkit-mustache-base

Pattern Lab's Base StarterKit for Mustache.
5
star
27

plugin-node-tab

ARCHIVED - The Tab plugin allows you to define additional code tabs to the pattern viewer / modal.
JavaScript
5
star
28

uikit-bare

A mostly empty starter UI to build around Pattern Lab Node output
CSS
4
star
29

patternengine-node-nunjucks

ARCHIVED
JavaScript
2
star
30

plugin-php-twig-extensions

Experimental implementation of the default Twig extensions.
PHP
2
star
31

starterkit-mustache-acidtest

Cross-platform acid tests for Pattern Lab
2
star
32

patternengine-node-underscore

ARCHIVED - The Underscore engine for Patternlab/Node
JavaScript
1
star
33

styleguidekit-mustache-default

The default Mustache StyleguideKit provides the basic front-end assets when using the Mustache PatternEngine.
HTML
1
star