From a525628fa8d442759f18bd02808bc1445acb39fa Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Thu, 30 Jun 2016 22:05:20 -0500 Subject: [PATCH 1/8] more shields in the README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e56f6fb3..067e6369b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/pattern-lab/patternlab-node.png?branch=master)](https://travis-ci.org/pattern-lab/patternlab-node) [![Join the chat at Gitter](https://badges.gitter.im/pattern-lab/node.svg)](https://gitter.im/pattern-lab/node) +[![Build Status](https://travis-ci.org/pattern-lab/patternlab-node.png?branch=master)](https://travis-ci.org/pattern-lab/patternlab-node) ![current release](https://img.shields.io/github/release/pattern-lab/patternlab-node.svg?maxAge=2592000) ![license](https://img.shields.io/github/license/pattern-lab/patternlab-node.svg?maxAge=2592000) [![Join the chat at Gitter](https://badges.gitter.im/pattern-lab/node.svg)](https://gitter.im/pattern-lab/node) # Pattern Lab Node Core @@ -6,7 +6,7 @@ This repository contains the core functionality for Pattern Lab Node. Pattern La If this looks **REALLY DIFFERENT** from what you expected, check out the [ChangeLog](https://github.com/pattern-lab/patternlab-node/wiki/ChangeLog). * [Pattern Lab/Node: Gulp Edition](https://github.com/pattern-lab/edition-node-gulp) contains info how to get started within a Gulp task running environment. -* [Pattern Lab/Node: Grunt Node Edition](https://github.com/pattern-lab/edition-node-grunt) contains info how to get started within a Grunt task running environment. +* [Pattern Lab/Node: Grunt Edition](https://github.com/pattern-lab/edition-node-grunt) contains info how to get started within a Grunt task running environment. ## Core Team From 80c28e8d2cc08929c97e6240deabe47c739d35ab Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Thu, 30 Jun 2016 23:45:14 -0500 Subject: [PATCH 2/8] abstracted annotations.md markdown parser into a shared component - all existing tests pass - patternState and many other keys are now parsed out of pattern.md - supports pseudopatterns too https://github.com/pattern-lab/patternlab-node/issues/376 --- core/lib/annotation_exporter.js | 59 ++++++++------------------ core/lib/markdown_parser.js | 53 ++++++++++++++++++++++++ core/lib/pattern_assembler.js | 71 +++++++++++++++++++++++++------- core/lib/pseudopattern_hunter.js | 6 +-- patternlab-config.json | 1 - 5 files changed, 131 insertions(+), 59 deletions(-) create mode 100644 core/lib/markdown_parser.js diff --git a/core/lib/annotation_exporter.js b/core/lib/annotation_exporter.js index 0000e2bbd..e51ff1106 100644 --- a/core/lib/annotation_exporter.js +++ b/core/lib/annotation_exporter.js @@ -1,12 +1,14 @@ "use strict"; +var path = require('path'), + fs = require('fs-extra'), + JSON5 = require('json5'), + _ = require('lodash'), + mp = require('./markdown_parser'); + var annotations_exporter = function (pl) { - var path = require('path'), - fs = require('fs-extra'), - JSON5 = require('json5'), - _ = require('lodash'), - md = require('markdown-it')(), - paths = pl.config.paths; + + var paths = pl.config.paths; /* Returns the array of comments that used to be wrapped in raw JS. @@ -38,6 +40,7 @@ var annotations_exporter = function (pl) { Converts the annotations.md file yaml list into an array of annotations */ function parseAnnotationsMD() { + var markdown_parser = new mp(); var annotations = []; //attempt to read the file @@ -53,42 +56,17 @@ var annotations_exporter = function (pl) { //take the annotation snippets and split them on our custom delimiter var annotationsYAML = annotationsMD.split('~*~'); + for (var i = 0; i < annotationsYAML.length; i++) { var annotation = {}; - //for each annotation process the yaml frontmatter and markdown - var annotationSnippet = annotationsYAML[i]; - var annotationsRE = /---\r?\n{1}([\s\S]*)---\r?\n{1}([\s\S]*)+/gm; - var chunks = annotationsRE.exec(annotationSnippet); - if (chunks && chunks[1] && chunks[2]) { - - //convert each yaml frontmatter key into an object key - var frontmatter = chunks[1]; - var frontmatterLines = frontmatter.split(/\n/gm); - for (var j = 0; j < frontmatterLines.length; j++) { - var frontmatterLine = frontmatterLines[j]; - if (frontmatterLine.length > 0) { - var frontmatterLineChunks = frontmatterLine.split(':'); //test this - var frontmatterKey = frontmatterLineChunks[0].toLowerCase().trim(); - var frontmatterValueString = frontmatterLineChunks[1].trim(); - var frontmatterValue = frontmatterValueString.substring(1, frontmatterValueString.length - 1); - if (frontmatterKey === 'el' || frontmatterKey === 'selector') { - annotation.el = frontmatterValue; - } - if (frontmatterKey === 'title') { - annotation.title = frontmatterValue; - } - } - } - - //set the comment to the parsed markdown - var annotationMarkdown = chunks[2]; - annotation.comment = md.render(annotationMarkdown); - - annotations.push(annotation); - } else { - console.log('annotations.md file not formatted as expected. Error parsing frontmatter and markdown out of ' + annotationSnippet); - } + var markdownObj = markdown_parser.parse(annotationsYAML[i]); + + annotation.el = markdownObj.el || markdownObj.selector; + annotation.title = markdownObj.title; + annotation.comment = markdownObj.markdown; + + annotations.push(annotation); } return annotations; } @@ -96,8 +74,7 @@ var annotations_exporter = function (pl) { function gatherAnnotations() { var annotationsJS = parseAnnotationsJS(); var annotationsMD = parseAnnotationsMD(); - var mergedAnnotations = _.unionBy(annotationsJS, annotationsMD, 'el'); - return mergedAnnotations; + return _.unionBy(annotationsJS, annotationsMD, 'el'); } return { diff --git a/core/lib/markdown_parser.js b/core/lib/markdown_parser.js new file mode 100644 index 000000000..71b273456 --- /dev/null +++ b/core/lib/markdown_parser.js @@ -0,0 +1,53 @@ +"use strict"; + +var md = require('markdown-it')(); + +var markdown_parser = function () { + + function parseMarkdownBlock(block) { + var returnObject = {}; + + try { + //for each block process the yaml frontmatter and markdown + var frontmatterRE = /---\r?\n{1}([\s\S]*)---\r?\n{1}([\s\S]*)+/gm; + var chunks = frontmatterRE.exec(block); + if (chunks && chunks[1] && chunks[2]) { + + //convert each yaml frontmatter key / value into an object key + var frontmatter = chunks[1]; + var frontmatterLines = frontmatter.split(/\n/gm); + for (var j = 0; j < frontmatterLines.length; j++) { + + var frontmatterLine = frontmatterLines[j]; + if (frontmatterLine.length > 0) { + + var frontmatterLineChunks = frontmatterLine.split(':'); //test this + var frontmatterKey = frontmatterLineChunks[0].toLowerCase().trim(); + var frontmatterValueString = frontmatterLineChunks[1].trim(); + + returnObject[frontmatterKey] = frontmatterValueString.substring(1, frontmatterValueString.length - 1); + } + + } + + //parse the actual markdown + returnObject.markdown = md.render(chunks[2]); + } + } catch (ex) { + console.log(ex); + console.log('error parsing markdown block', block); + } + + //return the frontmatter keys and markdown for a consumer to decide what to do with + return returnObject; + } + + return { + parse: function (block) { + return parseMarkdownBlock(block); + } + }; + +}; + +module.exports = markdown_parser; diff --git a/core/lib/pattern_assembler.js b/core/lib/pattern_assembler.js index 829cc0bc8..6b35aa0bf 100644 --- a/core/lib/pattern_assembler.js +++ b/core/lib/pattern_assembler.js @@ -5,7 +5,7 @@ var pattern_assembler = function () { fs = require('fs-extra'), Pattern = require('./object_factory').Pattern, pph = require('./pseudopattern_hunter'), - md = require('markdown-it')(), + mp = require('./markdown_parser'), plutils = require('./utilities'), patternEngines = require('./pattern_engines'); @@ -66,6 +66,9 @@ var pattern_assembler = function () { } } + /* + * Deprecated in favor of .md 'status' frontmatter inside a pattern. Still used for unit tests at this time. + */ function setState(pattern, patternlab) { if (patternlab.config.patternStates && patternlab.config.patternStates[pattern.patternPartial]) { pattern.patternState = patternlab.config.patternStates[pattern.patternPartial]; @@ -123,6 +126,54 @@ var pattern_assembler = function () { } } + function parsePatternMarkdown(currentPattern, patternlab) { + + var markdown_parser = new mp(); + + try { + var markdownFileName = path.resolve(patternlab.config.paths.source.patterns, currentPattern.subdir, currentPattern.fileName + ".md"); + var markdownFileContents = fs.readFileSync(markdownFileName, 'utf8'); + + var markdownObject = markdown_parser.parse(markdownFileContents); + if (!plutils.isObjectEmpty(markdownObject)) { + //set keys and markdown itself + currentPattern.patternDescExists = true; + currentPattern.patternDesc = markdownObject.markdown; + + //consider looping through all keys eventually. would need to blacklist some properties and whitelist others + if (markdownObject.status) { + currentPattern.patternState = markdownObject.status; + } + if (markdownObject.order) { + currentPattern.order = markdownObject.order; + } + if (markdownObject.hidden) { + currentPattern.hidden = markdownObject.hidden; + } + if (markdownObject.excludeFromStyleguide) { + currentPattern.excludeFromStyleguide = markdownObject.excludeFromStyleguide; + } + if (markdownObject.tags) { + currentPattern.tags = markdownObject.tags; + } + if (markdownObject.links) { + currentPattern.links = markdownObject.links; + } + } else { + if (patternlab.config.debug) { + console.log('error processing markdown for ' + currentPattern.patternPartial); + } + } + + if (patternlab.config.debug) { + console.log('found pattern-specific markdown for ' + currentPattern.patternPartial); + } + } + catch (e) { + // do nothing + } + } + function processPatternIterative(relPath, patternlab) { var pseudopattern_hunter = new pph(); @@ -149,7 +200,7 @@ var pattern_assembler = function () { } //see if this file has a state - setState(currentPattern, patternlab); + //setState(currentPattern, patternlab); //look for a json file for this template try { @@ -193,18 +244,7 @@ var pattern_assembler = function () { } //look for a markdown file for this template - try { - var markdownFileName = path.resolve(patternlab.config.paths.source.patterns, currentPattern.subdir, currentPattern.fileName + ".md"); - var markdownFileContents = fs.readFileSync(markdownFileName, 'utf8'); - currentPattern.patternDescExists = true; - currentPattern.patternDesc = md.render(markdownFileContents); - if (patternlab.config.debug) { - console.log('found pattern-specific markdown-documentation.md for ' + currentPattern.patternPartial); - } - } - catch (e) { - // do nothing - } + parsePatternMarkdown(currentPattern, patternlab); //add the raw template to memory currentPattern.template = fs.readFileSync(path.resolve(patternsPath, relPath), 'utf8'); @@ -397,6 +437,9 @@ var pattern_assembler = function () { }, parse_data_links_specific: function (patternlab, data, label) { return parseDataLinksHelper(patternlab, data, label) + }, + parse_pattern_markdown: function (pattern, patternlab) { + parsePatternMarkdown(pattern, patternlab); } }; diff --git a/core/lib/pseudopattern_hunter.js b/core/lib/pseudopattern_hunter.js index 47e4b7e57..eb8753be2 100644 --- a/core/lib/pseudopattern_hunter.js +++ b/core/lib/pseudopattern_hunter.js @@ -38,7 +38,7 @@ var pseudopattern_hunter = function () { console.log('There was an error parsing pseudopattern JSON for ' + currentPattern.relPath); console.log(err); } - + //extend any existing data with variant data variantFileData = plutils.mergeData(currentPattern.jsonFileData, variantFileData); @@ -56,8 +56,8 @@ var pseudopattern_hunter = function () { engine: currentPattern.engine }); - //see if this file has a state - pattern_assembler.setPatternState(patternVariant, patternlab); + //process the companion markdown file if it exists + pattern_assembler.parse_pattern_markdown(patternVariant, patternlab); //find pattern lineage lineage_hunter.find_lineage(patternVariant, patternlab); diff --git a/patternlab-config.json b/patternlab-config.json index 984ec73c0..b3f2d975b 100644 --- a/patternlab-config.json +++ b/patternlab-config.json @@ -51,7 +51,6 @@ "ishMaximum": "2600", "patternStateCascade": ["inprogress", "inreview", "complete"], "patternStates": { - "molecules-block-hero" : "inreview" }, "patternExportPatternPartials": [], "patternExportDirectory": "./pattern_exports/", From 92b70538edca19d742aa387115f9dd74ed1d21af Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Sun, 3 Jul 2016 15:35:33 -0500 Subject: [PATCH 3/8] engine_mustache_tests file broken out of pattern_assembler. --- core/lib/pattern_assembler.js | 3 +- test/engine_mustache_tests.js | 216 ++++++++++++++++++++++ test/pattern_assembler_tests.js | 313 ++++++++------------------------ 3 files changed, 297 insertions(+), 235 deletions(-) create mode 100644 test/engine_mustache_tests.js diff --git a/core/lib/pattern_assembler.js b/core/lib/pattern_assembler.js index 6b35aa0bf..10f1676a5 100644 --- a/core/lib/pattern_assembler.js +++ b/core/lib/pattern_assembler.js @@ -286,7 +286,7 @@ var pattern_assembler = function () { currentPattern.extendedTemplate = currentPattern.template; //find how many partials there may be for the given pattern - var foundPatternPartials = currentPattern.findPartials(currentPattern); + var foundPatternPartials = currentPattern.findPartials(); //find any listItem blocks that within the pattern, even if there are no partials list_item_hunter.process_list_item_partials(currentPattern, patternlab); @@ -294,6 +294,7 @@ var pattern_assembler = function () { // expand any partials present in this pattern; that is, drill down into // the template and replace their calls in this template with rendered // results + if (currentPattern.engine.expandPartials && (foundPatternPartials !== null && foundPatternPartials.length > 0)) { // eslint-disable-next-line expandPartials(foundPatternPartials, list_item_hunter, patternlab, currentPattern); diff --git a/test/engine_mustache_tests.js b/test/engine_mustache_tests.js new file mode 100644 index 000000000..da811be0e --- /dev/null +++ b/test/engine_mustache_tests.js @@ -0,0 +1,216 @@ +"use strict"; + +var path = require('path'); +var pa = require('../core/lib/pattern_assembler'); +var Pattern = require('../core/lib/object_factory').Pattern; +var testPatternsPath = path.resolve(__dirname, 'files', '_patterns'); +var eol = require('os').EOL; + +// fake pattern lab constructor: +// sets up a fake patternlab object, which is needed by the pattern processing +// apparatus. +function fakePatternLab() { + var fpl = { + partials: {}, + patterns: [], + footer: '', + header: '', + listitems: {}, + listItemArray: [], + data: { + link: {} + }, + config: require('../patternlab-config.json'), + package: {} + }; + + // patch the pattern source so the pattern assembler can correctly determine + // the "subdir" + fpl.config.paths.source.patterns = testPatternsPath; + + return fpl; +} + +// function for testing sets of partials +function testFindPartials(test, partialTests) { + test.expect(partialTests.length + 1); + + // setup current pattern from what we would have during execution + // docs on partial syntax are here: + // http://patternlab.io/docs/pattern-including.html + var currentPattern = Pattern.create( + '01-molecules/00-testing/00-test-mol.mustache', // relative path now + null, // data + { + template: partialTests.join(eol) + } + ); + + // act + var results = currentPattern.findPartials(); + + // assert + test.equals(results.length, partialTests.length); + partialTests.forEach(function (testString, index) { + test.equals(results[index], testString); + }); + + test.done(); +} + +function testFindPartialsWithStyleModifiers(test, partialTests) { + test.expect(partialTests.length + 1); + + // setup current pattern from what we would have during execution + // docs on partial syntax are here: + // http://patternlab.io/docs/pattern-including.html + var currentPattern = Pattern.create( + '01-molecules/00-testing/00-test-mol.mustache', // relative path now + null, // data + { + template: partialTests.join(eol) + } + ); + + // act + var results = currentPattern.findPartialsWithStyleModifiers(); + + // assert + test.equals(results.length, partialTests.length); + partialTests.forEach(function (testString, index) { + test.equals(results[index], testString); + }); + + test.done(); +} + +function testFindPartialsWithPatternParameters(test, partialTests) { + test.expect(partialTests.length + 1); + + // setup current pattern from what we would have during execution + // docs on partial syntax are here: + // http://patternlab.io/docs/pattern-including.html + var currentPattern = Pattern.create( + '01-molecules/00-testing/00-test-mol.mustache', // relative path now + null, // data + { + template: partialTests.join(eol) + } + ); + + // act + var results = currentPattern.findPartialsWithPatternParameters(); + + // assert + test.equals(results.length, partialTests.length); + partialTests.forEach(function (testString, index) { + test.equals(results[index], testString); + }); + + test.done(); +} + +exports['engine_mustache'] = { + 'find_pattern_partials finds one simple partial': function (test) { + testFindPartials(test, [ + "{{> molecules-comment-header}}" + ]); + }, + + 'find_pattern_partials finds simple partials under stressed circumstances': function (test) { + testFindPartials(test, [ + "{{>molecules-comment-header}}", + "{{> " + eol + " molecules-comment-header" + eol + "}}", + "{{> molecules-weird-spacing }}" + ]); + }, + + 'find_pattern_partials finds one simple verbose partial': function (test) { + testFindPartials(test, [ + '{{> 00-atoms/00-global/06-test }}' + ]); + }, + + 'find_pattern_partials finds partials with parameters': function (test) { + testFindPartials(test, [ + "{{> molecules-single-comment(description: true) }}", + "{{> molecules-single-comment(description: 42) }}", + "{{> molecules-single-comment(description: '42') }}", + "{{> molecules-single-comment(description: \"42\") }}", + "{{> molecules-single-comment(description: 'test', anotherThing: 'retest') }}", + "{{> molecules-single-comment(description: false, anotherThing: \"retest\") }}", + '{{> molecules-single-comment(description:"A life is like a \"garden\". Perfect moments can be had, but not preserved, except in memory.") }}' + ]); + }, + + 'find_pattern_partials finds simple partials with style modifiers': function (test) { + testFindPartials(test, [ + '{{> molecules-single-comment:foo }}', + '{{> molecules-single-comment:foo|bar }}' + ]); + }, + 'find_pattern_partials finds mixed partials': function (test) { + testFindPartials(test, [ + '{{> molecules-single-comment:foo(description: "test", anotherThing: true) }}', + '{{> molecules-single-comment:foo|bar(description: true) }}' + ]); + }, + + 'find_pattern_partials finds one simple partial with styleModifier': function (test) { + testFindPartialsWithStyleModifiers(test, [ + "{{> molecules-comment-header:test}}" + ]); + }, + 'find_pattern_partials finds partial with many styleModifiers': function (test) { + testFindPartialsWithStyleModifiers(test, [ + "{{> molecules-comment-header:test|test2|test3}}" + ]); + }, + 'find_pattern_partials finds partials with differing styleModifiers': function (test) { + testFindPartialsWithStyleModifiers(test, [ + "{{> molecules-comment-header:test|test2|test3}}", + "{{> molecules-comment-header:foo-1}}", + "{{> molecules-comment-header:bar_1}}" + ]); + }, + 'find_pattern_partials finds partials with styleModifiers when parameters present': function (test) { + testFindPartialsWithStyleModifiers(test, [ + "{{> molecules-comment-header:test|test2|test3(description: true)}}", + "{{> molecules-comment-header:foo-1(description: 'foo')}}", + "{{> molecules-comment-header:bar_1(descrition: 'bar', anotherThing: 10102010) }}" + ]); + }, + + 'find_pattern_partials_with_parameters finds one simple partial with parameters': function (test) { + testFindPartialsWithPatternParameters(test, [ + "{{> molecules-comment-header(description: 'test')}}" + ]); + }, + 'find_pattern_partials_with_parameters finds partials with parameters': function (test) { + testFindPartialsWithPatternParameters(test, [ + "{{> molecules-single-comment(description: true) }}", + "{{> molecules-single-comment(description: 42) }}", + "{{> molecules-single-comment(description: '42') }}", + "{{> molecules-single-comment(description: \"42\") }}", + "{{> molecules-single-comment(description: 'test', anotherThing: 'retest') }}", + "{{> molecules-single-comment(description: false, anotherThing: \"retest\") }}", + '{{> molecules-single-comment(description:"A life is like a \"garden\". Perfect moments can be had, but not preserved, except in memory.") }}' + ]); + }, + 'find_pattern_partials finds partials with parameters when styleModifiers present': function (test) { + testFindPartialsWithPatternParameters(test, [ + "{{> molecules-comment-header:test|test2|test3(description: true)}}", + "{{> molecules-comment-header:foo-1(description: 'foo')}}", + "{{> molecules-comment-header:bar_1(descrition: 'bar', anotherThing: 10102010) }}" + ]); + } + +}; + + +// don't run these tests unless mustache is installed +var engineLoader = require('../core/lib/pattern_engines'); +if (!engineLoader.mustache) { + console.log("Mustache engine not installed, skipping tests."); + delete exports.engine_mustache; +} diff --git a/test/pattern_assembler_tests.js b/test/pattern_assembler_tests.js index bc649ac62..a6aad4b00 100644 --- a/test/pattern_assembler_tests.js +++ b/test/pattern_assembler_tests.js @@ -6,241 +6,86 @@ var path = require('path'); exports['pattern_assembler'] = { - 'find_pattern_partials finds partials' : function(test){ - // NOTES from GTP: - // it's nice to have so much test coverage, but it retrospect, I'm not - // happy with the structure I wound up with in this test; it's too - // difficult to add test cases and test failure reporting is not very - // granular. - - test.expect(16); - - // setup current pattern from what we would have during execution - // docs on partial syntax are here: - // http://patternlab.io/docs/pattern-including.html - var currentPattern = Pattern.create( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null, // data - { - template: "{{> molecules-comment-header}}asdfasdf" + - "{{> molecules-comment-header}}" + - "{{> \n molecules-comment-header\n}}" + - "{{> }}" + - "{{> molecules-weird-spacing }}" + - "{{> molecules-ba_d-cha*rs }}" + - "{{> molecules-single-comment(description: 'A life isn\\'t like a garden. Perfect moments can be had, but not preserved, except in memory.') }}" + - '{{> molecules-single-comment(description: "A life is like a \\"garden\\". Perfect moments can be had, but not preserved, except in memory.") }}' + - "{{> molecules-single-comment:foo }}" + - // verbose partial syntax, introduced in v0.12.0, with file extension - "{{> 01-molecules/06-components/03-comment-header.mustache }}" + - "{{> 01-molecules/06-components/02-single-comment.mustache(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}" + - "{{> molecules-single-comment:foo }}" + - "{{>atoms-error(message: 'That\\'s no moon...')}}" + - '{{>atoms-error(message: \'That\\\'s no moon...\')}}' + - "{{> 00-atoms/00-global/ }}" + - // verbose partial syntax, introduced in v0.12.0, no file extension - "{{> 00-atoms/00-global/06-test }}" + - "{{> molecules-single-comment:foo_1 }}" + - "{{> molecules-single-comment:foo-1 }}" - } - ); - - var results = currentPattern.findPartials(); - test.equals(results.length, 15); - test.equals(results[0], "{{> molecules-comment-header}}"); - test.equals(results[1], "{{> molecules-comment-header}}"); - test.equals(results[2], "{{> \n molecules-comment-header\n}}"); - test.equals(results[3], "{{> molecules-weird-spacing }}"); - test.equals(results[4], "{{> molecules-single-comment(description: 'A life isn\\'t like a garden. Perfect moments can be had, but not preserved, except in memory.') }}"); - test.equals(results[5], '{{> molecules-single-comment(description: "A life is like a \\"garden\\". Perfect moments can be had, but not preserved, except in memory.") }}'); - test.equals(results[6], "{{> molecules-single-comment:foo }}"); - test.equals(results[7], "{{> 01-molecules/06-components/03-comment-header.mustache }}"); - test.equals(results[8], "{{> 01-molecules/06-components/02-single-comment.mustache(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}"); - test.equals(results[9], "{{> molecules-single-comment:foo }}"); - test.equals(results[10], "{{>atoms-error(message: 'That\\'s no moon...')}}"); - test.equals(results[11], "{{>atoms-error(message: 'That\\'s no moon...')}}"); - test.equals(results[12], "{{> 00-atoms/00-global/06-test }}"); - test.equals(results[13], '{{> molecules-single-comment:foo_1 }}'); - test.equals(results[14], '{{> molecules-single-comment:foo-1 }}'); - test.done(); - }, - 'find_pattern_partials finds verbose partials' : function(test){ - test.expect(3); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> 01-molecules/06-components/03-comment-header.mustache }}

{{> 01-molecules/06-components/02-single-comment.mustache(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}
"; - - var results = currentPattern.findPartials(); - test.equals(results.length, 2); - test.equals(results[0], '{{> 01-molecules/06-components/03-comment-header.mustache }}'); - test.equals(results[1], '{{> 01-molecules/06-components/02-single-comment.mustache(description: \'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.\') }}'); - test.done(); - }, - 'find_pattern_partials_with_style_modifiers finds style modifiers' : function(test){ - test.expect(4); - - //setup current pattern from what we would have during execution - - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment:foo }}
{{> molecules-single-comment:foo_1 }}
{{> molecules-single-comment:foo-1 }}
"; - - var results = currentPattern.findPartialsWithStyleModifiers(); - test.equals(results.length, 3); - test.equals(results[0], '{{> molecules-single-comment:foo }}'); - test.equals(results[1], '{{> molecules-single-comment:foo_1 }}'); - test.equals(results[2], '{{> molecules-single-comment:foo-1 }}'); - - test.done(); - }, - 'find_pattern_partials_with_style_modifiers finds style modifiers with parameters present too' : function(test){ - test.expect(2); - - //setup current pattern from what we would have during execution - - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment:foo(bar:'baz') }}
"; - - var results = currentPattern.findPartialsWithStyleModifiers(); - test.equals(results.length, 1); - test.equals(results[0], "{{> molecules-single-comment:foo(bar:'baz') }}"); - - test.done(); - }, - 'find_pattern_partials_with_style_modifiers finds style modifiers with verbose partials' : function(test){ - test.expect(2); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> 01-molecules/06-components/molecules-comment-header}}

{{> 01-molecules/06-components/molecules-single-comment:foo }}
"; - - var results = currentPattern.findPartialsWithStyleModifiers(); - test.equals(results.length, 1); - test.equals(results[0], '{{> 01-molecules/06-components/molecules-single-comment:foo }}'); - - test.done(); - }, - 'find_pattern_partials_with_style_modifiers finds no style modifiers when only partials present' : function(test){ - test.expect(1); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment }}
"; - - var results = currentPattern.findPartialsWithStyleModifiers(); - test.equals(results, null); - - test.done(); - }, - 'find_pattern_partials_with_style_modifiers finds no style modifiers when only partials with pattern parameters present' : function(test){ - test.expect(1); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment(foo: 'bar') }}
"; - var results = currentPattern.findPartialsWithStyleModifiers(); - test.equals(results, null); - - test.done(); - }, - 'find_pattern_partials_with_parameters finds parameters' : function(test){ - test.expect(2); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment(bar:'baz') }}
"; - - var results = currentPattern.findPartialsWithPatternParameters(); - test.equals(results.length, 1); - test.equals(results[0], "{{> molecules-single-comment(bar:'baz') }}"); - - test.done(); - - }, - 'find_pattern_partials_with_parameters finds parameters when stylemodifiers present too' : function(test){ - test.expect(2); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment:foo(bar:'baz') }}
"; - - var results = currentPattern.findPartialsWithPatternParameters(); - test.equals(results.length, 1); - test.equals(results[0], "{{> molecules-single-comment:foo(bar:'baz') }}"); - - test.done(); - }, - 'find_pattern_partials_with_parameters finds parameters with verbose partials' : function(test){ - test.expect(2); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> 01-molecules/06-components/molecules-comment-header}}

{{> 01-molecules/06-components/molecules-single-comment(bar:'baz') }}
"; - - var results = currentPattern.findPartialsWithPatternParameters(); - test.equals(results.length, 1); - test.equals(results[0], "{{> 01-molecules/06-components/molecules-single-comment(bar:'baz') }}"); - - test.done(); - }, - 'find_pattern_partials_with_parameters finds no style modifiers when only partials present' : function(test){ - test.expect(1); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment }}
"; - - var results = currentPattern.findPartialsWithPatternParameters(); - test.equals(results, null); - - test.done(); - }, - 'find_pattern_partials_with_parameters finds no style modifiers when only partials with style modifiers present' : function(test){ - test.expect(1); - - //setup current pattern from what we would have during execution - var currentPattern = new Pattern( - '01-molecules/00-testing/00-test-mol.mustache', // relative path now - null // data - ); - currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment:foo }}
"; - - var results = currentPattern.findPartialsWithPatternParameters(); - test.equals(results, null); - - test.done(); - }, + //'find_pattern_partials_with_parameters finds parameters' : function(test){ + //test.expect(2); + // + // //setup current pattern from what we would have during execution + //var currentPattern = new Pattern( + // '01-molecules/00-testing/00-test-mol.mustache', // relative path now + // null // data + //); + // currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment(bar:'baz') }}
"; + // + //var results = currentPattern.findPartialsWithPatternParameters(); + // test.equals(results.length, 1); + // test.equals(results[0], "{{> molecules-single-comment(bar:'baz') }}"); + // + // test.done(); + // + //}, + //'find_pattern_partials_with_parameters finds parameters when stylemodifiers present too' : function(test){ + //test.expect(2); + // + // //setup current pattern from what we would have during execution + //var currentPattern = new Pattern( + // '01-molecules/00-testing/00-test-mol.mustache', // relative path now + // null // data + //); + // currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment:foo(bar:'baz') }}
"; + // + //var results = currentPattern.findPartialsWithPatternParameters(); + // test.equals(results.length, 1); + // test.equals(results[0], "{{> molecules-single-comment:foo(bar:'baz') }}"); + // + // test.done(); + //}, + //'find_pattern_partials_with_parameters finds parameters with verbose partials' : function(test){ + //test.expect(2); + // + // //setup current pattern from what we would have during execution + //var currentPattern = new Pattern( + // '01-molecules/00-testing/00-test-mol.mustache', // relative path now + // null // data + //); + // currentPattern.template = "

{{> 01-molecules/06-components/molecules-comment-header}}

{{> 01-molecules/06-components/molecules-single-comment(bar:'baz') }}
"; + // + //var results = currentPattern.findPartialsWithPatternParameters(); + // test.equals(results.length, 1); + // test.equals(results[0], "{{> 01-molecules/06-components/molecules-single-comment(bar:'baz') }}"); + // + // test.done(); + //}, + //'find_pattern_partials_with_parameters finds no style modifiers when only partials present' : function(test){ + //test.expect(1); + // + // //setup current pattern from what we would have during execution + //var currentPattern = new Pattern( + // '01-molecules/00-testing/00-test-mol.mustache', // relative path now + // null // data + //); + // currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment }}
"; + // + //var results = currentPattern.findPartialsWithPatternParameters(); + // test.equals(results, null); + // + // test.done(); + //}, + //'find_pattern_partials_with_parameters finds no style modifiers when only partials with style modifiers present' : function(test){ + //test.expect(1); + // + // //setup current pattern from what we would have during execution + //var currentPattern = new Pattern( + // '01-molecules/00-testing/00-test-mol.mustache', // relative path now + // null // data + //); + // currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment:foo }}
"; + // + //var results = currentPattern.findPartialsWithPatternParameters(); + // test.equals(results, null); + // + // test.done(); + //}, 'process_pattern_recursive recursively includes partials' : function(test){ test.expect(3); From bd771d97d360350de1ab2f8afbdc1e22b2a01f7a Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Sun, 3 Jul 2016 15:54:40 -0500 Subject: [PATCH 4/8] update semver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 212c34894..cc383a100 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "patternlab-node", "description": "Pattern Lab is a collection of tools to help you create atomic design systems. This is the node command line interface (CLI).", - "version": "2.0.1", + "version": "2.0.2", "main": "./core/lib/patternlab.js", "dependencies": { "diveSync": "^0.3.0", From 0e19c667cad944cfedec23dddbfe54388a7e1edb Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Sun, 3 Jul 2016 15:59:01 -0500 Subject: [PATCH 5/8] add an empty patternState --- core/lib/object_factory.js | 1 + test/object_factory_tests.js | 1 + 2 files changed, 2 insertions(+) diff --git a/core/lib/object_factory.js b/core/lib/object_factory.js index 1a55c5760..6f7d03f7b 100644 --- a/core/lib/object_factory.js +++ b/core/lib/object_factory.js @@ -46,6 +46,7 @@ var Pattern = function (relPath, data) { // name of the pattern. UPDATE: this.key is now known as this.patternPartial this.patternPartial = this.patternGroup + '-' + this.patternBaseName; + this.patternState = ''; this.template = ''; this.patternPartialCode = ''; this.lineage = []; diff --git a/test/object_factory_tests.js b/test/object_factory_tests.js index b2fdeab5e..685f74fbd 100644 --- a/test/object_factory_tests.js +++ b/test/object_factory_tests.js @@ -26,6 +26,7 @@ test.equals(p.lineageIndex.length, 0); test.equals(p.lineageR.length, 0); test.equals(p.lineageRIndex.length, 0); + test.equals(p.patternState, ''); test.done(); }, 'test Pattern with one-directory subdir works as expected' : function (test) { From 9a33208affd25d959e7b7ffcbe8a328dc6aa2400 Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Sun, 3 Jul 2016 23:05:11 -0500 Subject: [PATCH 6/8] added deprecation warning to setState removed it from all unit tests --- core/lib/pattern_assembler.js | 17 ++++--- test/lineage_hunter_tests.js | 31 +++--------- test/pattern_assembler_tests.js | 83 +-------------------------------- 3 files changed, 20 insertions(+), 111 deletions(-) diff --git a/core/lib/pattern_assembler.js b/core/lib/pattern_assembler.js index 10f1676a5..a4c5d86d9 100644 --- a/core/lib/pattern_assembler.js +++ b/core/lib/pattern_assembler.js @@ -68,12 +68,17 @@ var pattern_assembler = function () { /* * Deprecated in favor of .md 'status' frontmatter inside a pattern. Still used for unit tests at this time. + * Will be removed in future versions */ - function setState(pattern, patternlab) { + function setState(pattern, patternlab, displayDeprecatedWarning) { if (patternlab.config.patternStates && patternlab.config.patternStates[pattern.patternPartial]) { + + if (displayDeprecatedWarning) { + plutils.logRed("Deprecation Warning: Using patternlab-config.json patternStates object will be deprecated in favor of the state frontmatter key associated with individual pattern markdown files."); + console.log("This feature will still work in it's current form this release (but still be overridden by the new parsing method), and will be removed in the future."); + } + pattern.patternState = patternlab.config.patternStates[pattern.patternPartial]; - } else { - pattern.patternState = ""; } } @@ -200,7 +205,7 @@ var pattern_assembler = function () { } //see if this file has a state - //setState(currentPattern, patternlab); + setState(currentPattern, patternlab, true); //look for a json file for this template try { @@ -412,8 +417,8 @@ var pattern_assembler = function () { find_list_items: function (pattern) { return pattern.findListItems(); }, - setPatternState: function (pattern, patternlab) { - setState(pattern, patternlab); + setPatternState: function (pattern, patternlab, displayDeprecatedWarning) { + setState(pattern, patternlab, displayDeprecatedWarning); }, addPattern: function (pattern, patternlab) { addPattern(pattern, patternlab); diff --git a/test/lineage_hunter_tests.js b/test/lineage_hunter_tests.js index 1d2fa941f..c1e978859 100644 --- a/test/lineage_hunter_tests.js +++ b/test/lineage_hunter_tests.js @@ -159,22 +159,18 @@ exports['lineage hunter '] = { 'cascade_pattern_states promotes a lower pattern state up to the consumer': function (test) { //arrange var pl = createBasePatternLabObject(); - pl.config.patternStates = { - "test-foo": "complete", - "test-bar": "inreview" - }; var atomPattern = new of.Pattern('00-test/01-bar.mustache'); atomPattern.template = fs.readFileSync(pl.config.paths.source.patterns + '00-test/01-bar.mustache', 'utf8'); atomPattern.extendedTemplate = atomPattern.template; + atomPattern.patternState = "inreview"; - pattern_assembler.setPatternState(atomPattern, pl); pattern_assembler.addPattern(atomPattern, pl); var consumerPattern = new of.Pattern('00-test/00-foo.mustache'); consumerPattern.template = fs.readFileSync(pl.config.paths.source.patterns + '00-test/00-foo.mustache', 'utf8'); consumerPattern.extendedTemplate = consumerPattern.template; - pattern_assembler.setPatternState(consumerPattern, pl); + consumerPattern.patternState = "complete"; pattern_assembler.addPattern(consumerPattern, pl); lineage_hunter.find_lineage(consumerPattern, pl); @@ -191,22 +187,18 @@ exports['lineage hunter '] = { 'cascade_pattern_states promotes a lower pattern state up to the consumers lineage': function (test) { //arrange var pl = createBasePatternLabObject(); - pl.config.patternStates = { - "test-foo": "complete", - "test-bar": "inreview" - }; var atomPattern = new of.Pattern('00-test/01-bar.mustache'); atomPattern.template = fs.readFileSync(pl.config.paths.source.patterns + '00-test/01-bar.mustache', 'utf8'); atomPattern.extendedTemplate = atomPattern.template; + atomPattern.patternState = "inreview"; - pattern_assembler.setPatternState(atomPattern, pl); pattern_assembler.addPattern(atomPattern, pl); var consumerPattern = new of.Pattern('00-test/00-foo.mustache'); consumerPattern.template = fs.readFileSync(pl.config.paths.source.patterns + '00-test/00-foo.mustache', 'utf8'); consumerPattern.extendedTemplate = consumerPattern.template; - pattern_assembler.setPatternState(consumerPattern, pl); + consumerPattern.patternState = "complete"; pattern_assembler.addPattern(consumerPattern, pl); lineage_hunter.find_lineage(consumerPattern, pl); @@ -223,22 +215,17 @@ exports['lineage hunter '] = { 'cascade_pattern_states sets the pattern state on any lineage patterns reverse lineage': function (test) { //arrange var pl = createBasePatternLabObject(); - pl.config.patternStates = { - "test-foo": "complete", - "test-bar": "inreview" - }; var atomPattern = new of.Pattern('00-test/01-bar.mustache'); atomPattern.template = fs.readFileSync(pl.config.paths.source.patterns + '00-test/01-bar.mustache', 'utf8'); atomPattern.extendedTemplate = atomPattern.template; - - pattern_assembler.setPatternState(atomPattern, pl); + atomPattern.patternState = "inreview"; pattern_assembler.addPattern(atomPattern, pl); var consumerPattern = new of.Pattern('00-test/00-foo.mustache'); consumerPattern.template = fs.readFileSync(pl.config.paths.source.patterns + '00-test/00-foo.mustache', 'utf8'); consumerPattern.extendedTemplate = consumerPattern.template; - pattern_assembler.setPatternState(consumerPattern, pl); + consumerPattern.patternState = "complete"; pattern_assembler.addPattern(consumerPattern, pl); lineage_hunter.find_lineage(consumerPattern, pl); @@ -256,21 +243,17 @@ exports['lineage hunter '] = { 'cascade_pattern_states promotes lower pattern state when consumer does not have its own state': function (test) { //arrange var pl = createBasePatternLabObject(); - pl.config.patternStates = { - "test-bar": "inreview" - }; var atomPattern = new of.Pattern('00-test/01-bar.mustache'); atomPattern.template = fs.readFileSync(path.resolve(pl.config.paths.source.patterns, '00-test/01-bar.mustache'), 'utf8'); atomPattern.extendedTemplate = atomPattern.template; + atomPattern.patternState = "inreview"; - pattern_assembler.setPatternState(atomPattern, pl); pattern_assembler.addPattern(atomPattern, pl); var consumerPattern = new of.Pattern('00-test/00-foo.mustache'); consumerPattern.template = fs.readFileSync(path.resolve(pl.config.paths.source.patterns, '00-test/00-foo.mustache'), 'utf8'); consumerPattern.extendedTemplate = consumerPattern.template; - pattern_assembler.setPatternState(consumerPattern, pl); pattern_assembler.addPattern(consumerPattern, pl); lineage_hunter.find_lineage(consumerPattern, pl); diff --git a/test/pattern_assembler_tests.js b/test/pattern_assembler_tests.js index a6aad4b00..002ef35aa 100644 --- a/test/pattern_assembler_tests.js +++ b/test/pattern_assembler_tests.js @@ -6,86 +6,6 @@ var path = require('path'); exports['pattern_assembler'] = { - - //'find_pattern_partials_with_parameters finds parameters' : function(test){ - //test.expect(2); - // - // //setup current pattern from what we would have during execution - //var currentPattern = new Pattern( - // '01-molecules/00-testing/00-test-mol.mustache', // relative path now - // null // data - //); - // currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment(bar:'baz') }}
"; - // - //var results = currentPattern.findPartialsWithPatternParameters(); - // test.equals(results.length, 1); - // test.equals(results[0], "{{> molecules-single-comment(bar:'baz') }}"); - // - // test.done(); - // - //}, - //'find_pattern_partials_with_parameters finds parameters when stylemodifiers present too' : function(test){ - //test.expect(2); - // - // //setup current pattern from what we would have during execution - //var currentPattern = new Pattern( - // '01-molecules/00-testing/00-test-mol.mustache', // relative path now - // null // data - //); - // currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment:foo(bar:'baz') }}
"; - // - //var results = currentPattern.findPartialsWithPatternParameters(); - // test.equals(results.length, 1); - // test.equals(results[0], "{{> molecules-single-comment:foo(bar:'baz') }}"); - // - // test.done(); - //}, - //'find_pattern_partials_with_parameters finds parameters with verbose partials' : function(test){ - //test.expect(2); - // - // //setup current pattern from what we would have during execution - //var currentPattern = new Pattern( - // '01-molecules/00-testing/00-test-mol.mustache', // relative path now - // null // data - //); - // currentPattern.template = "

{{> 01-molecules/06-components/molecules-comment-header}}

{{> 01-molecules/06-components/molecules-single-comment(bar:'baz') }}
"; - // - //var results = currentPattern.findPartialsWithPatternParameters(); - // test.equals(results.length, 1); - // test.equals(results[0], "{{> 01-molecules/06-components/molecules-single-comment(bar:'baz') }}"); - // - // test.done(); - //}, - //'find_pattern_partials_with_parameters finds no style modifiers when only partials present' : function(test){ - //test.expect(1); - // - // //setup current pattern from what we would have during execution - //var currentPattern = new Pattern( - // '01-molecules/00-testing/00-test-mol.mustache', // relative path now - // null // data - //); - // currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment }}
"; - // - //var results = currentPattern.findPartialsWithPatternParameters(); - // test.equals(results, null); - // - // test.done(); - //}, - //'find_pattern_partials_with_parameters finds no style modifiers when only partials with style modifiers present' : function(test){ - //test.expect(1); - // - // //setup current pattern from what we would have during execution - //var currentPattern = new Pattern( - // '01-molecules/00-testing/00-test-mol.mustache', // relative path now - // null // data - //); - // currentPattern.template = "

{{> molecules-comment-header}}

{{> molecules-single-comment:foo }}
"; - // - //var results = currentPattern.findPartialsWithPatternParameters(); - // test.equals(results, null); - // - // test.done(); - //}, 'process_pattern_recursive recursively includes partials' : function(test){ test.expect(3); @@ -413,7 +333,8 @@ patternlab.config.patternStates["pages-homepage-emergency"] = "inprogress"; var pattern = { - key: "pages-homepage" + key: "pages-homepage", + patternState: "" }; //act From d74b1e711d58e66c4ff5b1e69fce7d754d35655f Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Sun, 3 Jul 2016 23:05:25 -0500 Subject: [PATCH 7/8] change patternState key from status to state per discussion with dave --- core/lib/pattern_assembler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/pattern_assembler.js b/core/lib/pattern_assembler.js index a4c5d86d9..aa6926b0c 100644 --- a/core/lib/pattern_assembler.js +++ b/core/lib/pattern_assembler.js @@ -146,8 +146,8 @@ var pattern_assembler = function () { currentPattern.patternDesc = markdownObject.markdown; //consider looping through all keys eventually. would need to blacklist some properties and whitelist others - if (markdownObject.status) { - currentPattern.patternState = markdownObject.status; + if (markdownObject.state) { + currentPattern.patternState = markdownObject.state; } if (markdownObject.order) { currentPattern.order = markdownObject.order; From 0860540b7ca125954f2fec7aa72912f00a50975e Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Sun, 3 Jul 2016 23:05:39 -0500 Subject: [PATCH 8/8] prepping for 2.1.0 release --- core/lib/patternlab.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/patternlab.js b/core/lib/patternlab.js index 45835b5e2..d38570a17 100644 --- a/core/lib/patternlab.js +++ b/core/lib/patternlab.js @@ -1,5 +1,5 @@ /* - * patternlab-node - v2.0.0 - 2016 + * patternlab-node - v2.1.0 - 2016 * * Brian Muenzenmeyer, Geoff Pursell, and the web community. * Licensed under the MIT license. diff --git a/package.json b/package.json index cc383a100..1cba62ce2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "patternlab-node", "description": "Pattern Lab is a collection of tools to help you create atomic design systems. This is the node command line interface (CLI).", - "version": "2.0.2", + "version": "2.1.0", "main": "./core/lib/patternlab.js", "dependencies": { "diveSync": "^0.3.0",