You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2023. It is now read-only.
The PHP version of Pattern Lab is, at its core, a static site generator. It combines platform-agnostic assets, like the [Mustache](http://mustache.github.io/)-based patterns and the JavaScript-based viewer, with a PHP-based "builder" that transforms and dynamically builds the Pattern Lab site. By making it a static site generator, Pattern Lab strongly separates patterns, data, and presentation from build logic.
4
+
# Pattern Lab Standard Edition for Mustache
5
+
6
+
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](http://mustache.github.io/)-based patterns, with a PHP-based "builder". Pattern Lab 2 introduces [the beginnings of an ecosystem](http://patternlab.io/docs/advanced-ecosystem-overview.html) 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 four PHP-based Editions currently available](http://patternlab.io/docs/installation.html).
8
7
9
8
## Demo
10
9
@@ -13,50 +12,74 @@ You can play with a demo of the front-end of Pattern Lab at [demo.patternlab.io]
*[Installing the PHP Version of Pattern Lab](http://patternlab.io/docs/installation.html)
17
-
*[Upgrading the PHP Version of Pattern Lab](http://patternlab.io/docs/upgrading.html)
18
-
*[Generating the Pattern Lab Website for the First Time](http://patternlab.io/docs/first-run.html)
19
-
*[Editing the Pattern Lab Website Source Files](http://patternlab.io/docs/editing-source-files.html)
20
-
*[Using the Command-line Options](http://patternlab.io/docs/command-line.html)
21
-
*[Command Prompt on Windows](http://patternlab.io/docs/command-prompt-windows.html)
22
-
23
-
## Working with Patterns
24
-
25
-
Patterns are the core element of Pattern Lab. Understanding how they work is the key to getting the most out of the system. Patterns use [Mustache](http://mustache.github.io/) so please read [Mustache's docs](http://mustache.github.io/mustache.5.html) as well.
26
-
27
-
*[How Patterns Are Organized](http://patternlab.io/docs/pattern-organization.html)
28
-
*[Adding New Patterns](http://patternlab.io/docs/pattern-add-new.html)
*[Viewing Patterns on a Mobile Device](http://patternlab.io/docs/pattern-mobile-view.html)
39
-
40
-
## Creating & Working With Dynamic Data for a Pattern
41
-
42
-
The PHP version of Pattern Lab utilizes Mustache as the template language for patterns. In addition to allowing for the [inclusion of one pattern within another](http://patternlab.io/docs/pattern-including.html) it also gives pattern developers the ability to include variables. This means that attributes like image sources can be centralized in one file for easy modification across one or more patterns. The PHP version of Pattern Lab uses a JSON file, `source/_data/data.json`, to centralize many of these attributes.
43
-
44
-
*[Introduction to JSON & Mustache Variables](http://patternlab.io/docs/data-json-mustache.html)
45
-
*[Overriding the Central `data.json` Values with Pattern-specific Values](http://patternlab.io/docs/data-pattern-specific.html)
46
-
*[Linking to Patterns with Pattern Lab's Default `link` Variable](http://patternlab.io/docs/data-link-variable.html)
47
-
*[Creating Lists with Pattern Lab's Default `listItems` Variable](http://patternlab.io/docs/data-listitems.html)
48
-
49
-
## Using Pattern Lab's Advanced Features
50
-
51
-
By default, the Pattern Lab assets can be manually generated and the Pattern Lab site manually refreshed but who wants to waste time doing that? Here are some ways that Pattern Lab can make your development workflow a little smoother:
52
-
53
-
*[Watching for Changes and Auto-Regenerating Patterns](http://patternlab.io/docs/advanced-auto-regenerate.html)
54
-
*[Auto-Reloading the Browser Window When Changes Are Made](http://patternlab.io/docs/advanced-reload-browser.html)
55
-
*[Multi-browser & Multi-device Testing with Page Follow](http://patternlab.io/docs/advanced-page-follow.html)
There are two methods for downloading and installing the Standard Edition for Mustache:
26
+
27
+
* Download a pre-built project
28
+
* Create a project based on this Edition with Composer
29
+
30
+
### Download a pre-built project
31
+
32
+
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](https://github.com/pattern-lab/patternlab-php/releases/latest).
33
+
34
+
**Note:** You'll need to install [Composer](https://getcomposer.org/) in the future if you want to [upgrade Pattern Lab](http://patternlab.io/docs/upgrading.html).
35
+
36
+
### Use Composer to create a project
37
+
38
+
Pattern Lab uses [Composer](https://getcomposer.org/) to manage project dependencies.
39
+
40
+
#### 1. Install Composer
41
+
42
+
Please follow the directions for [installing Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) on the Composer website. We recommend you [install it globally](https://getcomposer.org/doc/00-intro.md#globally).
43
+
44
+
#### 2. Install the Standard Edition for Mustache
45
+
46
+
Use Composer's [`create-project` command](https://getcomposer.org/doc/03-cli.md#create-project) to install the Standard Edition for Mustache into a location of your choosing. To create a project do the following:
47
+
48
+
1. In a terminal window navigate to the root of your project
49
+
2. Type `composer create-project pattern-lab/edition-mustache-webdesignday your-project-name && cd $_`
50
+
51
+
This will install the Standard Edition for Mustache into a directory called `your-project-name` in `install/location/`. You will be automatically dropped into the project directory after the process is finished.
52
+
53
+
## Migrating from Pattern Lab 1 to Pattern Lab 2
54
+
55
+
Pattern Lab 2 was a complete rewrite and reorganization of Pattern Lab 1. After installing the Standard Edition for Mustache do the following to migrate from Pattern Lab 1 to Pattern Lab 2:
56
+
57
+
1. Copy `./source` from your old project to your new install
58
+
2. Copy `./source/_patterns/00-atoms/00-meta/_00-head.mustache` to `./source/_meta/_00-head.mustache`
59
+
3. Copy `./source/_patterns/00-atoms/00-meta/_01-foot.mustache` to `./source/_meta/_00-foot.mustache`
60
+
4. Copy `./source/_data/annotations.js` to `./source/_annotations/annotations.js`
61
+
62
+
Everything else should work without changes.
63
+
64
+
## Need Pattern Lab 1?
65
+
66
+
The [source code for Pattern Lab 1](https://github.com/pattern-lab/patternlab-php/releases/tag/v1.1.0) is still available for download.
67
+
68
+
## Packaged Components
69
+
70
+
The Standard Edition for Mustache installs the following components:
0 commit comments