Skip to content

Commit cb4fe8e

Browse files
committed
add README entry for configurable paths
closes #229 closes #220
1 parent 2b11640 commit cb4fe8e

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,36 @@ Get more information about patternlab-node, pattern lab in general, and where to
8080
##### Watching Changes
8181
To have patternlab-node watch for changes to either a mustache template, data, or stylesheets, run `grunt|gulp watch` or `grunt|gulp serve`. The `Gruntfile|Gulpfile` governs what is watched. It should be easy to add scss or whatever preprocessor you fancy.
8282

83-
##### Preprocessor Support
84-
The patternlab-node release package ships with some `.scss` files utilized in the creation of the style guide and sample templates, but these are not required. The compilation tasks are commented out in the `Gruntfiles|Gulpfiles` but can be uncommented or changed to meet your needs. Sass modules are not included in `package.json` files - the prevailing thought being if you are familiar enough with preprocessors, you can use the instructions for [grunt-contrib-sass](https://github.com/gruntjs/grunt-contrib-sass) / [gulp-sass](https://github.com/dlmanning/gulp-sass) / _preprocessor of choice_ to install them. Uncomment the preprocessor configuration to fully utilize the example templates, css and style guide.
83+
##### Configurable Paths
84+
Pattern Lab Node ships with a particular source and public workflow intended to separate the code you work on with the code generated for consumption elsewhere. If you wish to change any paths, you may do so within `config.json`. The contents are here:
8585

86-
**NOTE:** You may run into issues installing gulp-sass if you don't have the latest Visual Studio on Windows. See [here](https://github.com/sass/node-sass/issues/469) for more information and [this query](https://github.com/sass/node-sass/issues?utf8=%E2%9C%93&q=is%3Aissue+install) for a slew of installation problems related to gulp-sass.
86+
```
87+
"paths" : {
88+
"source" : {
89+
"root": "./source/",
90+
"patterns" : "./source/_patterns/",
91+
"data" : "./source/_data/",
92+
"styleguide" : "./core/styleguide/",
93+
"patternlabFiles" : "./source/_patternlab-files/",
94+
"js" : "./source/js",
95+
"images" : "./source/images",
96+
"fonts" : "./source/fonts",
97+
"css" : "./source/css/"
98+
},
99+
"public" : {
100+
"root" : "./public/",
101+
"patterns" : "./public/patterns/",
102+
"data" : "./public/data/",
103+
"styleguide" : "./public/styleguide/",
104+
"js" : "./public/js",
105+
"images" : "./public/images",
106+
"fonts" : "./public/fonts",
107+
"css" : "./public/css"
108+
}
109+
}
110+
```
111+
112+
Note the intentional repitition of the nested structure, made this way for maximum flexibility. Relative paths are default but absolute paths should work too. You may also use these paths within Grunt or Gulp files by referring to the paths() object.
87113

88114
##### Nav Bar Controls
89115
If you don't have a need for some of the nav-bar tools in the Pattern Lab frontend, you can turn them off in `config.json`.

0 commit comments

Comments
 (0)