Skip to content

Commit 63029d9

Browse files
committed
prepping for release.
fixed #1. removed old code. updated changelog. added banner. fixes#9
1 parent 05bc6c9 commit 63029d9

File tree

8 files changed

+63
-913
lines changed

8 files changed

+63
-913
lines changed

CHANGELOG

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

3+
PL-node-v0.1.0
4+
- FIX: Links to patterns did not work when visited from a server
5+
- FIX: Patterns with hyphens in the name were breaking the iframe messaging
6+
- FIX: Added stlyeguide/js files that were ignored at one point
7+
- FIX: Watch _data/*.json files too
8+
- FIX: Copy images, in an attempt to exclude files like Thumbs.db
9+
- FIX: Typos in CHANGELOG
10+
- ADD: A banner to patternlab.js
11+
312
PL-node-v0.0.5
4-
- FIX: type in organisms global header
13+
- FIX: typo in organisms global header
514
- FIX: flat-structured pattern items rendered as if they had sub-menus #4
615
- ADD: Load all grunt tasks using matchdep
716
- THX: thanks to @colynb for the typo heads up
@@ -21,4 +30,4 @@ PL-node-v0.0.2
2130
- FIX: Grunt watching styleguide scss
2231

2332
PL-node-v0.0.1
24-
- Minimum Viable Product! At this point, I feel you could use Pattern Lab Node to build a atomic design-drive website.
33+
- Minimum Viable Product! At this point, I feel you could use Pattern Lab Node to build an atomic design-driven website.

Gruntfile.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ module.exports = function(grunt) {
44
grunt.initConfig({
55
pkg: grunt.file.readJSON('package.json'),
66
clean: ['./public/patterns'],
7+
concat: {
8+
options: {
9+
stripBanners: true,
10+
banner: '/* \n * <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n * \n * <%= pkg.author %>, and the web community.\n * Licensed under the <%= pkg.license %> license. \n * \n * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. \n *\n */\n\n',
11+
},
12+
dist: {
13+
src: './builder/patternlab.js',
14+
dest: './builder/patternlab.js'
15+
}
16+
},
717
copy: {
818
main: {
919
files: [
@@ -64,5 +74,5 @@ module.exports = function(grunt) {
6474
grunt.task.loadTasks('./builder/');
6575

6676
//if you choose to use scss, or any preprocessor, you can add it here
67-
grunt.registerTask('default', ['clean', 'patternlab', /*'sass',*/ 'copy']);
77+
grunt.registerTask('default', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy']);
6878
};

builder/patternlab.js

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*
2+
* patternlab-node - v0.1.0 - 2014-01-21
3+
*
4+
* 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.
8+
*
9+
*/
10+
111
var path = require('path');
212

313
var oPattern = function(name, subdir, filename, data){
@@ -196,34 +206,29 @@ module.exports = function(grunt) {
196206
navSubItem.patternPartial = bucketName + "-" + pattern.patternName; //add the hyphenated name
197207

198208
//if it is flat - we should not add the pattern to patternPaths
199-
//EXPERIMENT: ADD THESE ANYWAYS. COMMENTING OUT THE IF STATEMENT
200-
// if(flatPatternItem){
201-
// //grunt.log.writeln('flat source structure found for ' + navItemName + " " + bucketName);
209+
if(flatPatternItem){
202210

203-
// //add the navItem to patternItems
204-
// bucket.patternItems.push(navSubItem);
205-
206-
207-
// //EXPERIMENT: ADD THESE ANYWAYS
208-
211+
bucket.patternItems.push(navSubItem);
212+
213+
//add to patternPaths
214+
patternlab.patternPaths[bucketName][pattern.patternName] = pattern.subdir + "/" + pattern.filename.substring(0, pattern.filename.indexOf('.'));
209215

216+
} else{
210217

211-
// } else{
212-
//add the more complex nav items
213218
bucket.navItems.push(navItem);
214219
bucket.navItemsIndex.push(navItemName);
215220
navItem.navSubItems.push(navSubItem);
216221
navItem.navSubItemsIndex.push(navSubItemName);
217222

218223
//add to patternPaths
219224
patternlab.patternPaths[bucketName][pattern.patternName] = pattern.subdir + "/" + pattern.filename.substring(0, pattern.filename.indexOf('.'));
220-
// EXPERIMENT}
225+
226+
}
221227

222228
//add the bucket.
223229
patternlab.buckets.push(bucket);
224230
patternlab.bucketIndex.push(bucketName);
225231

226-
227232
//done
228233

229234
} else{
@@ -248,13 +253,15 @@ module.exports = function(grunt) {
248253
}
249254

250255
//if it is flat - we should not add the pattern to patternPaths
251-
//EXPERIMENT: ADD THESE ANYWAYS. COMMENTING OUT THE IF STATEMENT
252-
// if(flatPatternItem){
253-
// //grunt.log.writeln('flat source structure found for ' + navItemName + " " + bucketName);
256+
if(flatPatternItem){
257+
258+
//add the navItem to patternItems
259+
bucket.patternItems.push(navSubItem);
260+
261+
//add to patternPaths
262+
patternlab.patternPaths[bucketName][pattern.patternName] = pattern.subdir + "/" + pattern.filename.substring(0, pattern.filename.indexOf('.'));
254263

255-
// //add the navItem to patternItems
256-
// bucket.patternItems.push(navSubItem);
257-
// } else{
264+
} else{
258265
//check to see if navItem exists
259266
var navItemIndex = bucket.navItemsIndex.indexOf(navItemName);
260267
if(navItemIndex === -1){
@@ -274,11 +281,10 @@ module.exports = function(grunt) {
274281
navItem.navSubItemsIndex.push(navSubItemName);
275282
}
276283

277-
//add to patternPaths
284+
// just add to patternPaths
278285
patternlab.patternPaths[bucketName][pattern.patternName] = pattern.subdir + "/" + pattern.filename.substring(0, pattern.filename.indexOf('.'));
279286

280-
//EXPERIMENT }
281-
287+
}
282288

283289
//check to see if this bucket has a View All yet. If not, add it.
284290
// var navItem = bucket.navItems[navItemIndex];

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "patternlab-node",
3-
"version": "0.0.5",
3+
"description": "Pattern Lab is a collection of tools to help you create atomic design systems. This is the node command line interface (CLI).",
4+
"version": "0.1.0",
45
"devDependencies": {
56
"grunt": "~0.4.0",
67
"grunt-contrib-nodeunit": "~0.1.2",
@@ -9,6 +10,16 @@
910
"grunt-contrib-copy": "~0.4.0",
1011
"grunt-contrib-jshint": "~0.4.0",
1112
"grunt-contrib-clean": "~0.5.0",
13+
"grunt-contrib-concat": "~0.3.0",
1214
"matchdep": "~0.3.0"
13-
}
15+
},
16+
"keywords": [
17+
"Pattern Lab",
18+
"Atomic Web Design",
19+
"Node",
20+
"Grunt",
21+
"Javascript"
22+
],
23+
"author": "Brian Muenzenmeyer",
24+
"license": "MIT"
1425
}

public/styleguide/js/legacy/data-saver.js

Lines changed: 0 additions & 169 deletions
This file was deleted.

public/styleguide/js/legacy/jquery.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)