diff --git a/.gitignore b/.gitignore index 9704a6b09..ac97c0ae0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,8 @@ latest-change.txt patternlab.json .sass-cache/* /sass-cache -source/images/Thumbs.db \ No newline at end of file +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 diff --git a/CHANGELOG b/CHANGELOG index de3cb571e..ca0a358c5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 @@ -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 diff --git a/builder/lineage_hunter.js b/builder/lineage_hunter.js index ac248c05d..3c8b0f9e9 100644 --- a/builder/lineage_hunter.js +++ b/builder/lineage_hunter.js @@ -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. diff --git a/builder/media_hunter.js b/builder/media_hunter.js index 8985b9bd6..c6bdd645b 100644 --- a/builder/media_hunter.js +++ b/builder/media_hunter.js @@ -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. @@ -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); } diff --git a/builder/object_factory.js b/builder/object_factory.js index c88682ab4..51a0efff4 100644 --- a/builder/object_factory.js +++ b/builder/object_factory.js @@ -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. diff --git a/builder/pattern_exporter.js b/builder/pattern_exporter.js index 3009d01c0..aa0695399 100644 --- a/builder/pattern_exporter.js +++ b/builder/pattern_exporter.js @@ -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. diff --git a/builder/patternlab.js b/builder/patternlab.js index 3186822d2..f7450fbfa 100644 --- a/builder/patternlab.js +++ b/builder/patternlab.js @@ -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. @@ -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); diff --git a/builder/patternlab_grunt.js b/builder/patternlab_grunt.js index 6ba3e35fc..b5507ecc5 100644 --- a/builder/patternlab_grunt.js +++ b/builder/patternlab_grunt.js @@ -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. diff --git a/package.json b/package.json index 1ce4a4912..a1ae5e2a1 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": "0.8.0", + "version": "0.8.1", "devDependencies": { "grunt": "~0.4.0", "grunt-contrib-watch": "^0.6.1", diff --git a/source/css/scss/base/_global-classes.scss b/source/css/scss/base/_global-classes.scss index f327ab459..9e80691ff 100644 --- a/source/css/scss/base/_global-classes.scss +++ b/source/css/scss/base/_global-classes.scss @@ -80,6 +80,12 @@ } } +.hide-large-2 { + @media all and (min-width:$bp-large-2) { + display: none; + } +} + // .valid { color: $valid; diff --git a/source/css/style.css b/source/css/style.css index c82cd5abb..8c314e768 100644 --- a/source/css/style.css +++ b/source/css/style.css @@ -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; } diff --git a/test/media_hunter_tests.js b/test/media_hunter_tests.js index 925ab929e..ef5881c9a 100644 --- a/test/media_hunter_tests.js +++ b/test/media_hunter_tests.js @@ -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 @@ -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(); }