Skip to content

Commit 8748417

Browse files
Merge pull request #702 from pattern-lab/dev
Pattern Lab Node Core 2.12.0
2 parents eed159c + f38763c commit 8748417

File tree

7 files changed

+54
-10
lines changed

7 files changed

+54
-10
lines changed

.github/CONTRIBUTING.md

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
# Contributing to Patternlab Node
1+
# Contributing to Pattern Lab Node
22
If you'd like to contribute to Pattern Lab Node, please do so! There is always a lot of ground to cover and something for your wheelhouse.
33

44
No pull request is too small. Check out any [up for grabs issues](https://github.com/pattern-lab/patternlab-node/labels/up%20for%20grabs) as a good way to get your feet wet, or add some more unit tests.
55

6+
## Developing Locally
7+
8+
The best way to make changes to the Pattern Lab Node core and test them is through your existing edition.
9+
10+
* Fork this repository on Github.
11+
* Create a new branch in your fork and push your changes in that fork.
12+
* `npm install`
13+
* `npm link`
14+
* `cd /path/to/your/edition`
15+
* `npm link patternlab-node`
16+
617
## Guidelines
7-
1. Please keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
8-
2. _ALWAYS_ submit pull requests against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, port over your contribution manually if time allows, and/or third, close your pull request. If you have a major feature to stabilize over time, talk to @bmuenzenmeyer about making a dedicated `feature-branch`
9-
3. If you can, add some unit tests using the existing patterns in the `./test` directory
1018

11-
##Coding style
19+
* _ALWAYS_ submit pull requests against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, port over your contribution manually if time allows, and/or third, close your pull request. If you have a major feature to stabilize over time, talk to @bmuenzenmeyer via an issue about making a dedicated `feature-branch`
20+
* Please keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
21+
* Commits should reference the issue you are adressing. For any Pull Request that you send, use the template provided.
22+
* If you can, add some unit tests using the existing patterns in the `./test` directory
23+
* Large enhancements should begin with opening an issue. This will result in a more systematic way for us to review your contribution and determine if a [specifcation discussion](https://github.com/pattern-lab/the-spec/issues) needs to occur.
24+
25+
## Coding style
1226
Two files combine within the project to define and maintain our coding style.
1327

1428
* The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/).

.github/stale.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 60
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- staged of next release
8+
# Label to use when marking an issue as stale
9+
staleLabel: needs response
10+
# Comment to post when marking an issue as stale. Set to `false` to disable
11+
markComment: >
12+
This issue has been automatically marked as stale because it has not had
13+
recent activity. It will be closed if no further activity occurs. Thank you
14+
for your contributions.
15+
# Comment to post when closing a stale issue. Set to `false` to disable
16+
closeComment: false

core/lib/data_loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const glob = require('glob'),
1313
* @returns {*}
1414
*/
1515
function loadFile(dataFilesPath, fsDep) {
16-
const dataFilesFullPath = dataFilesPath + '*.{json,yml,yaml}';
16+
const dataFilesFullPath = dataFilesPath + '{.,[!-]*.}{json,yml,yaml}';
1717

1818
if (dataFilesPath) {
1919
const dataFiles = glob.sync(dataFilesFullPath),

core/lib/patternlab.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* patternlab-node - v2.11.1 - 2017
2+
* patternlab-node - v2.12.0 - 2017
33
*
44
* Brian Muenzenmeyer, Geoff Pursell, Raphael Okon, tburny and the web community.
55
* Licensed under the MIT license.
@@ -26,7 +26,8 @@ var diveSync = require('diveSync'),
2626
ui_builder = new ui(),
2727
pe = require('./pattern_exporter'),
2828
pattern_exporter = new pe(),
29-
PatternGraph = require('./pattern_graph').PatternGraph;
29+
PatternGraph = require('./pattern_graph').PatternGraph,
30+
updateNotifier = require('update-notifier');
3031

3132
//register our log events
3233
plutils.log.on('error', msg => console.log(msg));
@@ -43,6 +44,12 @@ console.log(
4344
var patternEngines = require('./pattern_engines');
4445
var EventEmitter = require('events').EventEmitter;
4546

47+
//bootstrap update notifier
48+
updateNotifier({
49+
pkg: packageInfo,
50+
updateCheckInterval: 1000 * 60 * 60 * 24 // notify at most once a day
51+
}).notify();
52+
4653
/**
4754
* Given a path, load info from the folder to compile into a single config object.
4855
* @param dataFilesPath

core/lib/ui_builder.js

+3
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,9 @@ var ui_builder = function () {
592592
//plugins
593593
output += 'var plugins = ' + JSON.stringify(patternlab.plugins || []) + ';' + eol;
594594

595+
//theme
596+
output += 'var theme = ' + JSON.stringify(patternlab.config.theme) + ';' + eol;
597+
595598
//smaller config elements
596599
output += 'var defaultShowPatternInfo = ' + (patternlab.config.defaultShowPatternInfo ? patternlab.config.defaultShowPatternInfo : 'false') + ';' + eol;
597600
output += 'var defaultPattern = "' + (patternlab.config.defaultPattern ? patternlab.config.defaultPattern : 'all') + '";' + eol;

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
{
22
"name": "patternlab-node",
33
"description": "Pattern Lab is a collection of tools to help you create atomic design systems. This is the node command line interface (CLI).",
4-
"version": "2.11.1",
4+
"version": "2.12.0",
55
"main": "./core/lib/patternlab.js",
66
"dependencies": {
77
"chalk": "^1.1.3",
88
"diveSync": "^0.3.0",
99
"fs-extra": "^0.30.0",
1010
"glob": "^7.0.0",
11+
"graphlib": "^2.1.1",
1112
"js-beautify": "^1.6.3",
1213
"js-yaml": "^3.6.1",
1314
"lodash": "~4.13.1",
1415
"markdown-it": "^6.0.1",
1516
"node-fetch": "^1.6.0",
1617
"patternengine-node-mustache": "^1.0.0",
17-
"graphlib": "^2.1.1"
18+
"update-notifier": "^2.2.0"
1819
},
1920
"devDependencies": {
2021
"eslint": "^3.5.0",

test/files/_data/foo-other.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"foo": "wrong"
3+
}

0 commit comments

Comments
 (0)