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
banner: '/* \n * <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n * \n * <%= pkg.author %>, and the web community.\n * Licensed under the <%= pkg.license %> license. \n * \n * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. \n *\n */\n\n',
13
+
banner: '/* \n * <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy") %> \n * \n * <%= pkg.author %>, and the web community.\n * Licensed under the <%= pkg.license %> license. \n * \n * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. \n *\n */\n\n',
Copy file name to clipboardExpand all lines: packages/patternengine-node-twig/README.md
+67-9Lines changed: 67 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -10,33 +10,91 @@ To run patternlab-node, just do the following from the command line at the root
10
10
2.`npm install -g grunt-cli`
11
11
3.`grunt`
12
12
13
-
This creates all patterns, the styleguide, and the pattern lab site.`patternlab.json` is a file created for debugging purposes. It tells you all the secrets in tidy json.
13
+
This creates all patterns, the styleguide, and the pattern lab site.
14
14
15
+
### Command Line Interface
16
+
17
+
The following are grunt task arguments you may execute:
18
+
19
+
##### `patternlab`
20
+
With no arguments, patternlab runs the full builder, compiling patterns, and constructing the front-end site.
21
+
22
+
##### `patternlab:only_patterns`
23
+
Compile the patterns only, outputting to ./public/patterns
24
+
25
+
##### `patternlab:v`
26
+
Retrieve the version of patternlab-node you have installed
27
+
28
+
##### `patternlab:help`
29
+
Get more information about patternlab-node, pattern lab in general, and where to report issues.
30
+
31
+
### Config Options
32
+
33
+
##### Watching Changes
15
34
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.
16
35
36
+
##### Nav Bar Controls
37
+
If you don't have a need for some of the nav-bar tools in the patternlab frontend, you can turn them off in `config.json`.
38
+
39
+
The current selection is as follows. It reflects support versus patternlab-php.
40
+
41
+
```
42
+
"ishControlsVisible": {
43
+
"s": true,
44
+
"m": true,
45
+
"l": true,
46
+
"full": true,
47
+
"ranndom": true,
48
+
"disco": true,
49
+
"hay": true,
50
+
"mqs": false,
51
+
"find": false,
52
+
"views-all": true,
53
+
"views-annotations": true,
54
+
"views-code": true,
55
+
"views-new": true,
56
+
"tools-all": true,
57
+
"tools-follow": false,
58
+
"tools-reload": false,
59
+
"tools-shortcuts": false,
60
+
"tools-docs": true
61
+
}
62
+
```
63
+
64
+
##### Verbose Mode
65
+
`patternlab.json` is a file created for debugging purposes. Set `debug` to true in `.config.json` to see all the secrets.
66
+
17
67
### Under Active Development
18
68
19
69
[](https://travis-ci.org/pattern-lab/patternlab-node) The Node version of Pattern Lab is under active development by [@bmuenzenmeyer](https://twitter.com/bmuenzenmeyer) and contributors. Pull requests welcome, but please take a moment to read the [guidelines](https://github.com/pattern-lab/patternlab-node/blob/master/CONTRIBUTING.md).
20
70
21
-
####Forward, To the Specification!
71
+
### Forward, To the Specification!
22
72
23
73
Dave Olsen has published the [specification](https://github.com/pattern-lab/the-spec/blob/draft/SPEC.md) for Pattern Lab ports. Development will be oriented toward compliance with this as the spec and the port mature together.
24
74
25
-
####Is Pattern Lab a Platform or a Build Tool?
75
+
### Is Pattern Lab a Platform or a Build Tool?
26
76
27
77
A lot of good conversation has revolved around whether Pattern Lab is a platform or a tool in the toolbox, part of a larger solution. It's my goal to #1) adhere to the specification and #2) meet the needs of both use cases.
28
78
79
+
If you want to only build the patterns, alter your `Gruntfile.js` patternlab task to the following:
29
80
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**
This will output compiled patterns to ./public/patterns/
32
86
33
87
===
34
88
35
-
## Demo
89
+
**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**
90
+
91
+
===
92
+
93
+
### Demo
36
94
37
95
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
96
39
-
## Getting Started
97
+
###Getting Started
40
98
41
99
The PHP version of Pattern Lab should be relatively easy for anyone to get up and running.
42
100
@@ -46,7 +104,7 @@ The PHP version of Pattern Lab should be relatively easy for anyone to get up an
46
104
*[Editing the Pattern Lab Website Source Files](https://github.com/pattern-lab/patternlab-php/wiki/Editing-the-Pattern-Lab-Website-Source-Files)
47
105
*[Using the Command-line Options](https://github.com/pattern-lab/patternlab-php/wiki/Using-the-Command-line-Options)
48
106
49
-
## Working with Patterns
107
+
###Working with Patterns
50
108
51
109
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
110
@@ -60,7 +118,7 @@ Patterns are the core element of Pattern Lab. Understanding how they work is the
60
118
*[Managing Assets for a Pattern: JavaScript, images, CSS, etc.](https://github.com/pattern-lab/patternlab-php/wiki/Managing-Assets-for-a-Pattern)
61
119
*[Modifying the Standard Header & Footer for Patterns](https://github.com/pattern-lab/patternlab-php/wiki/Modifying-the-Standard-Header-&-Footer-for-Patterns)
62
120
63
-
## Creating & Working With Dynamic Data for a Pattern
121
+
###Creating & Working With Dynamic Data for a Pattern
64
122
65
123
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
124
@@ -69,7 +127,7 @@ The PHP version of Pattern Lab utilizes Mustache as the template language for pa
69
127
*[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
128
*[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
129
72
-
## Using Pattern Lab's Advanced Features
130
+
###Using Pattern Lab's Advanced Features
73
131
74
132
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:
0 commit comments