Skip to content

Commit

Permalink
prepping for release.
Browse files Browse the repository at this point in the history
fixed #1. removed old code. updated changelog. added banner. fixes#9
  • Loading branch information
bmuenzenmeyer committed Jan 21, 2014
1 parent 05bc6c9 commit 63029d9
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 913 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.

PL-node-v0.1.0
- FIX: Links to patterns did not work when visited from a server
- FIX: Patterns with hyphens in the name were breaking the iframe messaging
- FIX: Added stlyeguide/js files that were ignored at one point
- FIX: Watch _data/*.json files too
- FIX: Copy images, in an attempt to exclude files like Thumbs.db
- FIX: Typos in CHANGELOG
- ADD: A banner to patternlab.js

PL-node-v0.0.5
- FIX: type in organisms global header
- FIX: typo in organisms global header
- FIX: flat-structured pattern items rendered as if they had sub-menus #4
- ADD: Load all grunt tasks using matchdep
- THX: thanks to @colynb for the typo heads up
Expand All @@ -21,4 +30,4 @@ PL-node-v0.0.2
- FIX: Grunt watching styleguide scss

PL-node-v0.0.1
- Minimum Viable Product! At this point, I feel you could use Pattern Lab Node to build a atomic design-drive website.
- Minimum Viable Product! At this point, I feel you could use Pattern Lab Node to build an atomic design-driven website.
12 changes: 11 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ['./public/patterns'],
concat: {
options: {
stripBanners: true,
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',
},
dist: {
src: './builder/patternlab.js',
dest: './builder/patternlab.js'
}
},
copy: {
main: {
files: [
Expand Down Expand Up @@ -64,5 +74,5 @@ module.exports = function(grunt) {
grunt.task.loadTasks('./builder/');

//if you choose to use scss, or any preprocessor, you can add it here
grunt.registerTask('default', ['clean', 'patternlab', /*'sass',*/ 'copy']);
grunt.registerTask('default', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy']);
};
50 changes: 28 additions & 22 deletions builder/patternlab.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* patternlab-node - v0.1.0 - 2014-01-21
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
*
* Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice.
*
*/

var path = require('path');

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

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

// //add the navItem to patternItems
// bucket.patternItems.push(navSubItem);


// //EXPERIMENT: ADD THESE ANYWAYS

bucket.patternItems.push(navSubItem);

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

} else{

// } else{
//add the more complex nav items
bucket.navItems.push(navItem);
bucket.navItemsIndex.push(navItemName);
navItem.navSubItems.push(navSubItem);
navItem.navSubItemsIndex.push(navSubItemName);

//add to patternPaths
patternlab.patternPaths[bucketName][pattern.patternName] = pattern.subdir + "/" + pattern.filename.substring(0, pattern.filename.indexOf('.'));
// EXPERIMENT}

}

//add the bucket.
patternlab.buckets.push(bucket);
patternlab.bucketIndex.push(bucketName);


//done

} else{
Expand All @@ -248,13 +253,15 @@ module.exports = function(grunt) {
}

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

//add the navItem to patternItems
bucket.patternItems.push(navSubItem);

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

// //add the navItem to patternItems
// bucket.patternItems.push(navSubItem);
// } else{
} else{
//check to see if navItem exists
var navItemIndex = bucket.navItemsIndex.indexOf(navItemName);
if(navItemIndex === -1){
Expand All @@ -274,11 +281,10 @@ module.exports = function(grunt) {
navItem.navSubItemsIndex.push(navSubItemName);
}

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

//EXPERIMENT }

}

//check to see if this bucket has a View All yet. If not, add it.
// var navItem = bucket.navItems[navItemIndex];
Expand Down
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "patternlab-node",
"version": "0.0.5",
"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.1.0",
"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-nodeunit": "~0.1.2",
Expand All @@ -9,6 +10,16 @@
"grunt-contrib-copy": "~0.4.0",
"grunt-contrib-jshint": "~0.4.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "~0.3.0",
"matchdep": "~0.3.0"
}
},
"keywords": [
"Pattern Lab",
"Atomic Web Design",
"Node",
"Grunt",
"Javascript"
],
"author": "Brian Muenzenmeyer",
"license": "MIT"
}
169 changes: 0 additions & 169 deletions public/styleguide/js/legacy/data-saver.js

This file was deleted.

4 changes: 0 additions & 4 deletions public/styleguide/js/legacy/jquery.js

This file was deleted.

Loading

0 comments on commit 63029d9

Please sign in to comment.