Skip to content

Commit

Permalink
Merge pull request #100 from pattern-lab/dev
Browse files Browse the repository at this point in the history
patternlab node 0.8.1 release
  • Loading branch information
Brian Muenzenmeyer committed Feb 27, 2015
2 parents e61b6f0 + 45690fd commit e60580d
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 12 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ latest-change.txt
patternlab.json
.sass-cache/*
/sass-cache
source/images/Thumbs.db
source/images/Thumbs.db
public/styleguide/css/static.css.map
public/styleguide/css/styleguide-specific.css.map
public/styleguide/css/styleguide.css.map
source/css/style.css.map
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.

PL-node-v0.8.1
- FIX: v8 is not pulling in values from global data.json
- FIX: MQ list breaks if media queries don't have spaces
- THX: @getsetbro for reporting these issues :D
- THX: @dmolsen for a cheat codes

PL-node-v0.8.0
- CHG: note the change in versioning to proper semver. wanted to do ths to inch closer to a 1.0.0 release
- DEL: deleted most of the lingering PHP sync listener code
Expand All @@ -9,6 +15,7 @@ PL-node-v0.8.0
- THX: @getsetbro for finding and fixing a typo
- FIX: fixed a bug preventing pattern states from displaying on the flat template/pages
- ADD: support for basic pseudo-patterns
- CHG: cleaned up patternlab.js a bit for future testing, a bit more DRYness.

PL-node-v0.1.7
- ADD: pattern export
Expand Down
2 changes: 1 addition & 1 deletion builder/lineage_hunter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* patternlab-node - v0.8.0 - 2015
* patternlab-node - v0.8.1 - 2015
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
Expand Down
4 changes: 2 additions & 2 deletions builder/media_hunter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* patternlab-node - v0.8.0 - 2015
* patternlab-node - v0.8.1 - 2015
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
Expand All @@ -26,7 +26,7 @@
var safeContents = contents.replace("\r", " ").replace("\n", " ");
var matches = safeContents.match(/\((min|max)-width:([ ]+)?(([0-9]{1,5})(\.[0-9]{1,20}|)(px|em))/g);
for(var i = 0; i < matches.length; i++){
var breakpoint = matches[i].substring(matches[i].indexOf(' ') + 1);
var breakpoint = matches[i].substring(matches[i].indexOf(':') + 1).trimLeft();
if(patternlab.mediaQueries.indexOf(breakpoint) === -1){
patternlab.mediaQueries.push(breakpoint);
}
Expand Down
2 changes: 1 addition & 1 deletion builder/object_factory.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* patternlab-node - v0.8.0 - 2015
* patternlab-node - v0.8.1 - 2015
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion builder/pattern_exporter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* patternlab-node - v0.8.0 - 2015
* patternlab-node - v0.8.1 - 2015
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
Expand Down
4 changes: 2 additions & 2 deletions builder/patternlab.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* patternlab-node - v0.8.0 - 2015
* patternlab-node - v0.8.1 - 2015
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
Expand Down Expand Up @@ -87,7 +87,7 @@ var patternlab_engine = function(){
//TODO: https://github.com/pattern-lab/patternlab-node/issues/95 check for patternstylemodifiers before we do much else. need to remove these from the template for proper rendering

//make a new Pattern Object
currentPattern = new of.oPattern(subdir, filename, {});
currentPattern = new of.oPattern(subdir, filename);

//see if this file has a state
assembler.setPatternState(currentPattern, patternlab);
Expand Down
2 changes: 1 addition & 1 deletion builder/patternlab_grunt.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* patternlab-node - v0.8.0 - 2015
* patternlab-node - v0.8.1 - 2015
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": "0.8.0",
"version": "0.8.1",
"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-watch": "^0.6.1",
Expand Down
6 changes: 6 additions & 0 deletions source/css/scss/base/_global-classes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
}
}

.hide-large-2 {
@media all and (min-width:$bp-large-2) {
display: none;
}
}

//
.valid {
color: $valid;
Expand Down
6 changes: 6 additions & 0 deletions source/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ header, footer, nav, section, article, hgroup, figure {
}
}

@media all and (min-width: 66em) {
.hide-large-2 {
display: none;
}
}

.valid {
color: #089e00;
}
Expand Down
47 changes: 45 additions & 2 deletions test/media_hunter_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

var MediaHunter = require('../builder/media_hunter');

exports['media_query hunter '] = {
//all tests here run against the shipped code, and as such altering any of that can break these tests
//these tests are intended to catch development regressions. one should not have a need to run tests during patternlab use.

exports['media_query hunter basic support '] = {
'test media hunter finds query' : function(test){

//setup pl object
Expand All @@ -12,7 +15,47 @@

mh.find_media_queries(pl);

test.equals(pl.mediaQueries.length, 6);
test.equals(pl.mediaQueries.length, 7);

test.done();
}
};

exports['media_query hunter spaces '] = {
'test media hunter supports spaces in media query' : function(test){

//setup pl object
var pl = {};
var mh = new MediaHunter();

mh.find_media_queries(pl);

test.equals(pl.mediaQueries[0], '24em');

test.done();
}
};

exports['media_query hunter no spaces '] = {
'test media hunter supports nospaces in media query' : function(test){

//setup pl object
var pl = {};
var mh = new MediaHunter();

mh.find_media_queries(pl);

//the last media query found in the shipped suite does not have a space
//you can see this here:

//./source/css/scss/base/_global-classes.scss
// .hide-large-2 {
// @media all and (min-width:$bp-large-2) {
// display: none;
// }
// }

test.equals(pl.mediaQueries[6], '66em');

test.done();
}
Expand Down

0 comments on commit e60580d

Please sign in to comment.