Skip to content

Commit e8f060f

Browse files
author
Brian Muenzenmeyer
committed
Merge pull request #195 from pattern-lab/dev
v0.15.1
2 parents 3912333 + 8584231 commit e8f060f

26 files changed

+296
-38
lines changed

CHANGELOG

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

3+
PL-node-v0.15.1
4+
- FIX: Resolve issue with styleModifiers not being replaced when the partial has spaces in it.
5+
- ADD: Support multiple styleModifier classes using the | pipe syntax
6+
- FIX: Resolve issue with styleModifiers not being applied correctly when mixed with pattern parameters
7+
- THX: Thanks @theorise for the issue reports!
8+
39
PL-node-v0.15.0
410
- CHG: Updated package.json devDependencies for Node 4.X and 5.X support.
511
- CHG: Updated package.gulp.json devDependencies for Node 4.X and 5.X support.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#Contributing to Patternlab - Node
22
If you'd like to contribute to patternlab - node, please do so! There is always a lot of ground to cover, with patternlab - php being so feature-rich.
33

4-
No pull request is too small.
4+
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.
55

66
##Guidelines
77
1. Please keep your pull requests concise and limited to **ONE** substantive change at a time.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ It's not expected to toggle between the two build systems, but for those migrati
4949

5050
### Upgrading
5151

52-
You can find some simple upgrade documenation in it's current home here (unreleased but confirmed to work): [https://github.com/pattern-lab/website/blob/dev/patternlabsite/docs/node/upgrading.md](https://github.com/pattern-lab/website/blob/dev/patternlabsite/docs/node/upgrading.md)
52+
You can find instructions on how to upgrade from version to version of Pattern Lab Node here: [https://github.com/pattern-lab/patternlab-node/wiki/Upgrading](https://github.com/pattern-lab/patternlab-node/wiki/Upgrading)
5353

5454
### Command Line Interface
5555

@@ -212,6 +212,11 @@ Once rendered, it looks like this:
212212
</div>
213213
```
214214

215+
You may also specify multiple classes using a pipe character (|).
216+
217+
```
218+
{{> atoms-message:error|is-on }}
219+
```
215220

216221

217222

builder/lineage_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.0 - 2015
2+
* patternlab-node - v0.15.1 - 2015
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.

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.0 - 2015
2+
* patternlab-node - v0.15.1 - 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.0 - 2015
2+
* patternlab-node - v0.15.1 - 2015
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.

builder/object_factory.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.0 - 2015
2+
* patternlab-node - v0.15.1 - 2015
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.

builder/parameter_hunter.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/*
2-
* patternlab-node - v0.15.0 - 2015
3-
*
1+
/*
2+
* patternlab-node - v0.15.1 - 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

@@ -28,6 +28,8 @@
2828
//find the partial's name and retrieve it
2929
var partialName = pMatch.match(/([\w\-\.\/~]+)/g)[0];
3030
var partialPattern = pattern_assembler.get_pattern_by_key(partialName, patternlab);
31+
//if we retrieved a pattern we should make sure that its extendedTemplate is reset. looks to fix #190
32+
partialPattern.extendedTemplate = partialPattern.template;
3133

3234
if(patternlab.config.debug){
3335
console.log('found patternParameters for ' + partialName);

builder/pattern_assembler.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/*
2-
* patternlab-node - v0.15.0 - 2015
3-
*
1+
/*
2+
* patternlab-node - v0.15.1 - 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

@@ -24,19 +24,19 @@
2424

2525
// returns any patterns that match {{> value:mod }} or {{> value:mod(foo:"bar") }} within the pattern
2626
function findPartialsWithStyleModifiers(pattern){
27-
var matches = pattern.template.match(/{{>([ ])?([\w\-\.\/~]+)(?!\()(\:[A-Za-z0-9-_]+)+(?:(| )\(.*)?([ ])?}}/g);
27+
var matches = pattern.template.match(/{{>([ ])?([\w\-\.\/~]+)(?!\()(\:[A-Za-z0-9-_|]+)+(?:(| )\(.*)?([ ])?}}/g);
2828
return matches;
2929
}
3030

3131
// returns any patterns that match {{> value(foo:"bar") }} or {{> value:mod(foo:"bar") }} within the pattern
3232
function findPartialsWithPatternParameters(pattern){
33-
var matches = pattern.template.match(/{{>([ ])?([\w\-\.\/~]+)(?:\:[A-Za-z0-9-_]+)?(?:(| )\(.*)+([ ])?}}/g);
33+
var matches = pattern.template.match(/{{>([ ])?([\w\-\.\/~]+)(?:\:[A-Za-z0-9-_|]+)?(?:(| )\(.*)+([ ])?}}/g);
3434
return matches;
3535
}
3636

3737
//find and return any {{> template-name* }} within pattern
3838
function findPartials(pattern){
39-
var matches = pattern.template.match(/{{>([ ])?([\w\-\.\/~]+)(?:\:[A-Za-z0-9-_]+)?(?:(| )\(.*)?([ ])?}}/g);
39+
var matches = pattern.template.match(/{{>([ ])?([\w\-\.\/~]+)(?:\:[A-Za-z0-9-_|]+)?(?:(| )\(.*)?([ ])?}}/g);
4040
return matches;
4141
}
4242

@@ -207,7 +207,7 @@
207207

208208
//do something with the regular old partials
209209
for(i = 0; i < foundPatternPartials.length; i++){
210-
var partialKey = foundPatternPartials[i].replace(/{{>([ ])?([\w\-\.\/~]+)(:[A-z-_]+)?(?:\:[A-Za-z0-9-]+)?(?:(| )\(.*)?([ ])?}}/g, '$2');
210+
var partialKey = foundPatternPartials[i].replace(/{{>([ ])?([\w\-\.\/~]+)(:[A-z-_|]+)?(?:\:[A-Za-z0-9-_]+)?(?:(| )\(.*)?([ ])?}}/g, '$2');
211211

212212
var partialPath;
213213

@@ -262,7 +262,7 @@
262262
throw 'Could not find pattern with key ' + key;
263263
}
264264

265-
265+
266266
function mergeData(obj1, obj2){
267267
if(typeof obj2 === 'undefined'){
268268
obj2 = {};

builder/pattern_exporter.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.0 - 2015
2+
* patternlab-node - v0.15.1 - 2015
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.

0 commit comments

Comments
 (0)