|
| 1 | +## About the Node Version of Pattern Lab |
| 2 | + |
| 3 | +The Node 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 Node-based "builder" that transforms and dynamically builds the Pattern Lab site. By making it a static site generator, the Node version of Pattern Lab strongly separates patterns, data, and presentation from build logic. The Node version is a work in progress, the [PHP version](https://github.com/pattern-lab/patternlab-php) should be seen as a reference for other developers to improve upon as they build their own Pattern Lab Builders in their language of choice. |
| 4 | + |
| 5 | +## Under Active Development |
| 6 | + |
| 7 | +The Node version of Pattern Lab is under active development by [@bmuenzenmeyer](https://twitter.com/bmuenzenmeyer) and (hopefully) [@Wiscow](https://twitter.com/Wiscow). Contributions welcome. We both have kids under 2 years of age, so patience and coffee is requested :D |
| 8 | + |
| 9 | +### Getting Started |
| 10 | + |
| 11 | +To run patternlab-node, just do the following from the command line at the root of patternlab-node: |
| 12 | + |
| 13 | +1. `npm install` |
| 14 | +2. `npm install -g grunt-cli` |
| 15 | +3. `grunt` |
| 16 | + |
| 17 | +This creates all patterns, the styleguide, and the patternlab site. `patternlab.json` is a file created for debugging purposes. It tells you all the secrets in tidy json. |
| 18 | + |
| 19 | +To have patternlab-node watch for changes to either a mustache template, data, or stylesheets, run `grunt watch`. The `Gruntfile` governs what is watched. It should be easy to add scss or whatever preprocessor you fancy. |
| 20 | + |
| 21 | +#### Watching Progress |
| 22 | + |
| 23 | +Patternlab Node has reached [minimum viable product](http://en.wikipedia.org/wiki/Minimum_viable_product) status. The main branch will always have the most up to date version of patternlab-node. Watch the dev branch for what it coming next! |
| 24 | + |
| 25 | +#### Roadmap |
| 26 | +* Full Patternlab site support. (This is the uber cool navigation found at [demo.pattern-lab.info](http://demo.pattern-lab.info)). |
| 27 | +* More Documentation |
| 28 | +* Tests |
| 29 | + |
| 30 | +**THE FOLLOWING IS FROM THE PATTERNLAB-PHP PROJECT. A LOT STILL APPLIES TO PATTERNLAB-NODE, BUT IT HAS NOT BEEN ADAPTED YET. USE AT YOUR OWN PERIL** |
| 31 | + |
| 32 | + |
| 33 | +=== |
| 34 | + |
| 35 | +## Demo |
| 36 | + |
| 37 | +You can play with a demo of the front-end of the PHP version of Pattern Lab at [demo.pattern-lab.info](http://demo.pattern-lab.info). |
| 38 | + |
| 39 | +## Getting Started |
| 40 | + |
| 41 | +The PHP version of Pattern Lab should be relatively easy for anyone to get up and running. |
| 42 | + |
| 43 | +* [Requirements](https://github.com/pattern-lab/patternlab-php/wiki/Requirements) |
| 44 | +* [Installing the PHP Version of Pattern Lab](https://github.com/pattern-lab/patternlab-php/wiki/Installing-the-PHP-Version-of-Pattern-Lab) |
| 45 | +* [Generating the Pattern Lab Website for the First Time](https://github.com/pattern-lab/patternlab-php/wiki/Generating-the-Pattern-Lab-Website-for-the-First-Time) |
| 46 | +* [Editing the Pattern Lab Website Source Files](https://github.com/pattern-lab/patternlab-php/wiki/Editing-the-Pattern-Lab-Website-Source-Files) |
| 47 | +* [Using the Command-line Options](https://github.com/pattern-lab/patternlab-php/wiki/Using-the-Command-line-Options) |
| 48 | + |
| 49 | +## Working with Patterns |
| 50 | + |
| 51 | +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. |
| 52 | + |
| 53 | +* [How Patterns Are Organized](https://github.com/pattern-lab/patternlab-php/wiki/How-Patterns-Are-Organized) |
| 54 | +* [Adding New Patterns](https://github.com/pattern-lab/patternlab-php/wiki/Adding-New-Patterns) |
| 55 | +* [Reorganizing Patterns](https://github.com/pattern-lab/patternlab-php/wiki/Reorganizing-Patterns) |
| 56 | +* [Converting Old Patterns](https://github.com/pattern-lab/patternlab-php/wiki/Converting-Old-Patterns) |
| 57 | +* ["Hiding" Patterns in the Navigation](https://github.com/pattern-lab/patternlab-php/wiki/Hiding-Patterns-in-the-Navigation) |
| 58 | +* [Including One Pattern Within Another via Partials](https://github.com/pattern-lab/patternlab-php/wiki/Including-One-Pattern-Within-Another) |
| 59 | +* [Linking Directly to a Pattern](https://github.com/pattern-lab/patternlab-php/wiki/Linking-Directly-to-a-Pattern) |
| 60 | +* [Managing Assets for a Pattern: JavaScript, images, CSS, etc.](https://github.com/pattern-lab/patternlab-php/wiki/Managing-Assets-for-a-Pattern) |
| 61 | +* [Modifying the Standard Header & Footer for Patterns](https://github.com/pattern-lab/patternlab-php/wiki/Modifying-the-Standard-Header-&-Footer-for-Patterns) |
| 62 | + |
| 63 | +## Creating & Working With Dynamic Data for a Pattern |
| 64 | + |
| 65 | +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](https://github.com/pattern-lab/patternlab-php/wiki/Including-One-Pattern-Within-Another) 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. |
| 66 | + |
| 67 | +* [Introduction to JSON & Mustache Variables](http://github.com/pattern-lab/patternlab-php/wiki/Introduction-to-JSON-&-Mustache-Variables) |
| 68 | +* [Overriding the Central `data.json` Values with Pattern-specific Values](https://github.com/pattern-lab/patternlab-php/wiki/Overriding-the-Central-%60data.json%60-Values-with-Pattern-specific-Values) |
| 69 | +* [Linking to Patterns with Pattern Lab's Default `link` Variable](https://github.com/pattern-lab/patternlab-php/wiki/Linking-to-Patterns-with-Pattern-Lab's-Default-%60link%60-Variable) |
| 70 | +* [Creating Lists with Pattern Lab's Default `listItems` Variable](https://github.com/pattern-lab/patternlab-php/wiki/Creating-Lists-with-Pattern-Lab's-Default-%60listItems%60-Variable) |
| 71 | + |
| 72 | +## Using Pattern Lab's Advanced Features |
| 73 | + |
| 74 | +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 the PHP version of Pattern Lab can make your development workflow a little smoother: |
| 75 | + |
| 76 | +* [Watching for Changes and Auto-Regenerating Patterns](https://github.com/pattern-lab/patternlab-php/wiki/Watching-for-Changes-and-Auto-Regenerating-Patterns) |
| 77 | +* [Auto-Reloading the Browser Window When Changes Are Made](https://github.com/pattern-lab/patternlab-php/wiki/Auto-Reloading-the-Browser-Window-When-Changes-Are-Made) |
| 78 | +* [Multi-browser & Multi-device Testing with Page Follow](https://github.com/pattern-lab/patternlab-php/wiki/Multi-browser-&-Multi-device-Testing-with-Page-Follow) |
0 commit comments