Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patternlab node 0.8.1 release #100

Merged
merged 6 commits into from
Feb 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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