Skip to content

Commit 31a5b11

Browse files
committed
renamed config.json to patternlab-config.json for better consumption
closes #192
1 parent 6f967dc commit 31a5b11

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = function (grunt) {
33
var path = require('path');
44

55
function paths() {
6-
return require('./config.json').paths;
6+
return require('./patternlab-config.json').paths;
77
}
88

99
// Project configuration.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Get more information about patternlab-node, pattern lab in general, and where to
8686
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.
8787

8888
##### Configurable Paths
89-
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:
89+
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 `patternlab-config.json`. The contents are here:
9090

9191
```
9292
"paths" : {
@@ -117,7 +117,7 @@ Pattern Lab Node ships with a particular source and public workflow intended to
117117
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.
118118

119119
##### Nav Bar Controls
120-
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`.
120+
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 `patternlab-config.json`.
121121

122122
The current selection is as follows.
123123

@@ -144,7 +144,7 @@ The current selection is as follows.
144144
}
145145
```
146146
##### Pattern States
147-
You can set the state of a pattern by including it in `config.json` too. The out of the box styles are in progress (orange), in review (yellow), and complete (green).
147+
You can set the state of a pattern by including it in `patternlab-config.json` too. The out of the box styles are in progress (orange), in review (yellow), and complete (green).
148148
Pattern states should be lowercase and use hyphens where spaces are present.
149149
```
150150
"patternStates": {
@@ -155,7 +155,7 @@ Pattern states should be lowercase and use hyphens where spaces are present.
155155
```
156156

157157
##### Pattern Export
158-
`config.json` also has two properties that work together to export completed patterns for use in a production environment. Provide an array of keys and an output directory. Pattern Lab doesn't ship with any pattern export keys, but the default directory is `"./pattern_exports/"` created inside the install directory.
158+
`patternlab-config.json` also has two properties that work together to export completed patterns for use in a production environment. Provide an array of keys and an output directory. Pattern Lab doesn't ship with any pattern export keys, but the default directory is `"./pattern_exports/"` created inside the install directory.
159159

160160
```
161161
"patternExportKeys": ["molecules-primary-nav", "organisms-header", "organisms-header"],
@@ -165,7 +165,7 @@ Pattern states should be lowercase and use hyphens where spaces are present.
165165
Coupled with exported css (much easier to extract with existing tools like [grunt-contrib-copy](https://github.com/gruntjs/grunt-contrib-copy)), pattern export can help to maintain the relevancy of the design system by directly placing partials in a directory of your choosing.
166166

167167
##### cacheBust
168-
`config.json` has this flag to instruct Pattern Lab to append a unique query string to Javascript and CSS assets throughout the frontend.
168+
`patternlab-config.json` has this flag to instruct Pattern Lab to append a unique query string to Javascript and CSS assets throughout the frontend.
169169

170170
```
171171
"cacheBust": true
@@ -174,7 +174,7 @@ Coupled with exported css (much easier to extract with existing tools like [grun
174174
Default: true
175175

176176
##### defaultPattter
177-
`config.json` has an entry that allows you to specifiy a specific pattern upon launch of the main site. It works even without BrowserSync running. Set it like this:
177+
`patternlab-config.json` has an entry that allows you to specifiy a specific pattern upon launch of the main site. It works even without BrowserSync running. Set it like this:
178178

179179
```
180180
"defaultPattern": "pages-homepage",
@@ -204,7 +204,7 @@ You can also exclude complete directories by prepending the directory name with
204204

205205
##### Style Guide Excludes
206206

207-
Exclude whole pattern types from the "All patterns" styleguide by adding entries to `config.json`. This is quite useful to make speedier. Pattern Lab Node ships with the following:
207+
Exclude whole pattern types from the "All patterns" styleguide by adding entries to `patternlab-config.json`. This is quite useful to make speedier. Pattern Lab Node ships with the following:
208208

209209
```
210210
"styleGuideExcludes": [
@@ -215,7 +215,7 @@ Exclude whole pattern types from the "All patterns" styleguide by adding entries
215215

216216

217217
##### Debug Mode
218-
`patternlab.json` is a file created for debugging purposes. Set `debug` to true in `.config.json` to see all the secrets.
218+
`patternlab.json` is a file created for debugging purposes. Set `debug` to true in `.patternlab-config.json` to see all the secrets.
219219

220220
##### Server & BrowserSync
221221
Running `grunt serve` or `gulp serve` will compile the Pattern Lab frontend and host it by default on <a href="http://localhost:3000">http://localhost:3000</a> via [BrowserSync](http://www.browsersync.io/docs/). After it starts, templates, `data.json`, and scss/css changes in your source code will be automatically injected into the page.

core/lib/patternlab.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var patternlab_engine = function (config) {
2222
patternlab = {};
2323

2424
patternlab.package = fs.readJSONSync('./package.json');
25-
patternlab.config = config || fs.readJSONSync(path.resolve(__dirname, '../../config.json'));
25+
patternlab.config = config || fs.readJSONSync(path.resolve(__dirname, '../../patternlab-config.json'));
2626

2727
var paths = patternlab.config.paths;
2828

@@ -47,7 +47,7 @@ var patternlab_engine = function (config) {
4747
}
4848

4949
function printDebug() {
50-
//debug file can be written by setting flag on config.json
50+
//debug file can be written by setting flag on patternlab-config.json
5151
if (patternlab.config.debug) {
5252
console.log('writing patternlab debug file to ./patternlab.json');
5353
fs.outputFileSync('./patternlab.json', JSON.stringify(patternlab, null, 3));

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var banner = [ '/** ',
2323
' * ', ' **/'].join(eol);
2424

2525
function paths() {
26-
return require('./config.json').paths;
26+
return require('./patternlab-config.json').paths;
2727
}
2828

2929
//load patternlab-node tasks
File renamed without changes.

test/pattern_assembler_tests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
var pattern_assembler = new pa();
198198
var patterns_dir = './test/files/_patterns';
199199
var patternlab = {};
200-
patternlab.config = fs.readJSONSync('./config.json');
200+
patternlab.config = fs.readJSONSync('./patternlab-config.json');
201201
patternlab.config.paths.source.patterns = patterns_dir;
202202

203203
patternlab.data = fs.readJSONSync(path.resolve(patternlab.config.paths.source.data, 'data.json'));
@@ -525,7 +525,7 @@
525525
var patterns_dir = './test/files/_patterns';
526526
var patternlab = {};
527527
//THIS IS BAD.
528-
patternlab.config = fs.readJSONSync('./config.json');
528+
patternlab.config = fs.readJSONSync('./patternlab-config.json');
529529
patternlab.config.paths.source.patterns = patterns_dir;
530530

531531
patternlab.data = fs.readJSONSync(path.resolve(patternlab.config.paths.source.data, 'data.json'));
@@ -618,7 +618,7 @@
618618
var patterns_dir = './test/files/_patterns/';
619619
var patternlab = {};
620620
//THIS IS BAD
621-
patternlab.config = fs.readJSONSync('./config.json');
621+
patternlab.config = fs.readJSONSync('./patternlab-config.json');
622622
patternlab.config.paths.source.patterns = patterns_dir;
623623
patternlab.data = fs.readJSONSync(path.resolve(patternlab.config.paths.source.data, 'data.json'));
624624
patternlab.listitems = fs.readJSONSync(path.resolve(patternlab.config.paths.source.data, 'listitems.json'));

0 commit comments

Comments
 (0)