From fc3cf72fd3da904d63c8247a1ad5da58f14eba74 Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Wed, 11 Feb 2015 01:20:41 -0600 Subject: [PATCH 1/6] missed a commit. --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index de3cb571e..7d17e8f46 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,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 From c98ee1c3b5fef2d5c480901b03f913c1422c0211 Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Thu, 26 Feb 2015 23:50:33 -0600 Subject: [PATCH 2/6] fixed an assumption in media hunter that was causing a media query with no spaces to break the MQ Nav. closes #98 --- .gitignore | 6 ++- builder/media_hunter.js | 2 +- source/css/scss/base/_global-classes.scss | 6 +++ test/media_hunter_tests.js | 47 ++++++++++++++++++++++- 4 files changed, 57 insertions(+), 4 deletions(-) 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/builder/media_hunter.js b/builder/media_hunter.js index 8985b9bd6..a73f06c75 100644 --- a/builder/media_hunter.js +++ b/builder/media_hunter.js @@ -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/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/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(); } From 67f12e938ef71e7418ee92dac9d100be0093e239 Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Thu, 26 Feb 2015 23:59:17 -0600 Subject: [PATCH 3/6] have to manually alter css in case people dont use scss (including travis) --- source/css/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/css/style.css b/source/css/style.css index c82cd5abb..74bfa617e 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: 566em) { + .hide-large-2 { + display: none; + } +} + .valid { color: #089e00; } From c861eb1b09eecae5a09012f46836315213285dd4 Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Fri, 27 Feb 2015 00:00:00 -0600 Subject: [PATCH 4/6] die typo --- source/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/css/style.css b/source/css/style.css index 74bfa617e..8c314e768 100644 --- a/source/css/style.css +++ b/source/css/style.css @@ -144,7 +144,7 @@ header, footer, nav, section, article, hgroup, figure { } } -@media all and (min-width: 566em) { +@media all and (min-width: 66em) { .hide-large-2 { display: none; } From ee89d89e6cf66c58bb84974a3ac923a9153ebcb2 Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Fri, 27 Feb 2015 00:12:30 -0600 Subject: [PATCH 5/6] use global data.json again. pattern init was causing an if statement to evaluate always true. closes #99 --- builder/patternlab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/patternlab.js b/builder/patternlab.js index 3186822d2..48b06b197 100644 --- a/builder/patternlab.js +++ b/builder/patternlab.js @@ -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); From 45690fdf3c6b8e5bb6ee927bc279a50c130e9025 Mon Sep 17 00:00:00 2001 From: BRIAN MUENZENMEYER Date: Fri, 27 Feb 2015 00:23:22 -0600 Subject: [PATCH 6/6] documenting changes for minor version release --- CHANGELOG | 6 ++++++ builder/lineage_hunter.js | 2 +- builder/media_hunter.js | 2 +- builder/object_factory.js | 2 +- builder/pattern_exporter.js | 2 +- builder/patternlab.js | 2 +- builder/patternlab_grunt.js | 2 +- package.json | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7d17e8f46..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 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 a73f06c75..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. 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 48b06b197..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. 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",