Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit 4f52169

Browse files
author
Brian Muenzenmeyer
committed
Merge pull request #208 from geoffp/pattern-engines
PatternEngines ongoing work, round 4
2 parents b807680 + a2c6c71 commit 4f52169

33 files changed

+765
-224
lines changed

.eslintrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"env": {
3-
"jasmine": true,
43
"node": true,
5-
"mocha": true,
6-
"browser": true,
74
"builtin": true
85
},
96
"globals": {},

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ public/index.html
44
public/styleguide.html
55
public/styleguide/html/styleguide.html
66
public/css/*
7+
public/data/*
78
public/fonts/*
89
public/js/*
910
public/images/*

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ branches:
1616
only:
1717
- master
1818
- dev
19+
- pattern-engines

CHANGELOG

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.
22

3+
PL-node-v1.0.0
4+
- FIX: Resolve issue with not hiding underscored patterns.
5+
- THX: Thanks @ivancamilov for reporting this regression.
6+
- FIX: Fix misapplied error input class
7+
- THX: Thanks @johngerome for the pull request!
8+
- ADD: Added a note in the README during installation to run with elevated privileges
9+
- THX: Thanks @RichardBray for the heads up
10+
- ADD: Added a Prerequisites section to the README
11+
- ADD: Added unit tests for pattern states and pseudopatterns
12+
- CHG: Changed pseudopattern generation to use config.patterns.source directory instead of hardcode
13+
- CHG: Explicitly sorting patterns by name prior to building the UI
14+
- ADD: Added ability to specify link.* urls inside data objects
15+
- CHG: Incremented version to 1.0.0. Achieved near-parity with PL PHP 1!
16+
- THX: Thanks to each and every person who cared about Pattern Lab Node! - Brian
17+
318
PL-node-v0.15.1
419
- FIX: Resolve issue with styleModifiers not being replaced when the partial has spaces in it.
520
- ADD: Support multiple styleModifier classes using the | pipe syntax

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ The Node version of [Pattern Lab](http://patternlab.io/) is, at its core, a stat
66

77
This repository contains the vanilla builder logic, grunt and gulp configurations, and some sample template/css/data to illustrate the power and flexibility of the tool.
88

9+
### Prerequisites
10+
11+
Make sure Node and npm are installed. A great guide can be found here: [https://docs.npmjs.com/getting-started/installing-node](https://docs.npmjs.com/getting-started/installing-node)
12+
913
### Download
1014

1115
* Download the [latest release of patternlab-node](https://github.com/pattern-lab/patternlab-node/releases/latest) from Github
1216
* Via npm, run `npm install patternlab-node` (Note this will auto install the grunt version currently. see below)
1317
* **NOTE** Node version 4.X and 5.X have tentative support, citing [a lot of Windows issues](https://github.com/nodejs/node-gyp/issues/629), including [mine](https://github.com/pattern-lab/patternlab-node/issues/162). Upgrade node at your own risk until otherwise stated. I've tried to catalog some issues and troubleshooting steps on the [wiki](https://github.com/pattern-lab/patternlab-node/wiki/Windows-Issues).
1418

19+
### Troubleshooting Installs
20+
21+
Make sure you are running your terminal/command line session as administrator. This could mean `sudo`, or opening the window with a right-click option.
22+
1523
### Choose Your Adventure! Now Vanilla, Grunt & Gulp
1624

1725
This repository ships with two `package.json` files, a `Gruntfile.js`, and a `gulpfile.js`. The default is grunt currently. The core builder is not dependent on either.

builder/lineage_hunter.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* patternlab-node - v0.15.1 - 2015
2+
* patternlab-node - v1.0.0 - 2015
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.
@@ -20,9 +20,6 @@
2020
var config = require('../config.json');
2121

2222
//find the {{> template-name }} within patterns
23-
if (config.debug) {
24-
console.log('===\n', pattern, '\n===');
25-
}
2623
var matches = pattern.findPartials();
2724
if(matches !== null){
2825
matches.forEach(function(match, index, matches){

builder/list_item_hunter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* patternlab-node - v0.15.1 - 2015
2+
* patternlab-node - v1.0.0 - 2015
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.

builder/media_hunter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* patternlab-node - v0.15.1 - 2015
2+
* patternlab-node - v1.0.0 - 2015
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.

builder/object_factory.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
2-
* patternlab-node - v0.15.1 - 2015
3-
*
1+
/*
2+
* patternlab-node - v1.0.0 - 2015
3+
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.
66
*
@@ -20,9 +20,6 @@
2020
// oPattern properties
2121

2222
var oPattern = function(abspath, subdir, filename, data) {
23-
if (config.debug) {
24-
console.log('=== NEW OPATTERN.', '\nabsPath:', abspath, '\nsubdir:', subdir, '\nfilename:', filename, '\ndata:\n', data);
25-
}
2623
this.fileName = filename.substring(0, filename.indexOf('.'));
2724
this.fileExtension = path.extname(abspath);
2825
this.abspath = abspath;
@@ -61,6 +58,12 @@
6158
return this.engine.renderPattern(this.extendedTemplate, data, partials);
6259
},
6360

61+
registerPartial: function () {
62+
if (typeof this.engine.registerPartial === 'function') {
63+
this.engine.registerPartial(this);
64+
}
65+
},
66+
6467
// the finders all delegate to the PatternEngine, which also encapsulates all
6568
// appropriate regexes
6669
findPartials: function () {

builder/parameter_hunter.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/*
2-
* patternlab-node - v0.15.1 - 2015
3-
*
1+
/*
2+
* patternlab-node - v1.0.0 - 2015
3+
*
44
* Brian Muenzenmeyer, and the web community.
5-
* Licensed under the MIT license.
6-
*
7-
* Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice.
5+
* Licensed under the MIT license.
6+
*
7+
* Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice.
88
*
99
*/
1010

0 commit comments

Comments
 (0)