Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit d022308

Browse files
committed
Merge tag 'v0.12.0' into pattern-engines
2 parents 5420ad1 + 12a40e1 commit d022308

29 files changed

+1110
-458
lines changed

CHANGELOG

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.
2+
3+
PL-node-v0.12.0
4+
- ADD: Gulp support arrives with an optional configuration
5+
- ADD: Instructions how to install and run with Gulp
6+
- DEL: Deleted the sass modules from `package.json` files
7+
- CHG: Commented out all sass tasks in Grunt and Gulp files
8+
- CHG: Changed static web server provider to BrowserSync
9+
- CHG: Replaced the Style Guide toolbar Auto-Reload and Page Follow with a link to the BrowserSync UI
10+
- THX: Thanks @oscar-g for the initial work on the gulpfile!
11+
- ADD: An alternative, more verbose syntax for pattern partial inclusion
12+
- THX: Thanks @e2tha-e for the thoughtful addition with unit test coverage
13+
14+
PL-node-v0.11.0
15+
- ADD: Ignore pattern directories that start with an underscore.
16+
- ADD: Support for lists with the listItems variable
17+
- FIX: Resolved issue where pattern parameter data bled into global data object
18+
- ADD: Support a fluid viewport
19+
220
PL-node-v0.10.1
321
- ADD: Added more unit tests for recently more-modular code
422
- FIX: Lineage was not working for patterns with pattern parameters

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ If you'd like to contribute to patternlab - node, please do so! There is always
44
No pull request is too small.
55

66
##Guidelines
7-
1. Please keep your pull requests concise
8-
2. _ALWAYS_ submit it against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, port over your contribution manually if time allows, and/or third, close your pull request.
9-
3. If you can, add some unit tests using the existing patterns
7+
1. Please keep your pull requests concise and limited to **ONE** substantive change at a time.
8+
2. _ALWAYS_ submit pull requests against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, port over your contribution manually if time allows, and/or third, close your pull request.
9+
3. If you can, add some unit tests using the existing patterns
10+
11+
##Coding style
12+
Regarding code style like indentation and whitespace, follow the conventions you see used in the source already. Add enough source code comments to help the next person.

Gruntfile.js

Lines changed: 61 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ module.exports = function(grunt) {
33
// Project configuration.
44
grunt.initConfig({
55
pkg: grunt.file.readJSON('package.json'),
6-
clean: {
7-
options: { force: true },
8-
files: ['./public/patterns']
9-
},
106
concat: {
117
options: {
128
stripBanners: true,
@@ -47,6 +43,10 @@ module.exports = function(grunt) {
4743
pseudopattern_hunter: {
4844
src: './builder/pseudopattern_hunter.js',
4945
dest: './builder/pseudopattern_hunter.js'
46+
},
47+
list_item_hunter: {
48+
src: './builder/list_item_hunter.js',
49+
dest: './builder/list_item_hunter.js'
5050
}
5151
},
5252
copy: {
@@ -59,67 +59,72 @@ module.exports = function(grunt) {
5959
{ expand: true, cwd: './source/fonts/', src: '*', dest: './public/fonts/'},
6060
{ expand: true, cwd: './source/_data/', src: 'annotations.js', dest: './public/data/' }
6161
]
62-
}
63-
},
64-
jshint: {
65-
options: {
66-
"curly": true,
67-
"eqnull": true,
68-
"eqeqeq": true,
69-
"undef": true,
70-
"forin": true,
71-
//"unused": true,
72-
"node": true
7362
},
74-
patternlab: ['Gruntfile.js', './builder/lib/patternlab.js']
63+
css: {
64+
files: [
65+
{ expand: true, cwd: './source/css/', src: '*.css', dest: './public/css/' }
66+
]
67+
}
7568
},
7669
watch: {
77-
// scss: { //scss can be watched if you like
78-
// options: {
79-
// livereload: true
80-
// },
70+
all: {
71+
files: [
72+
'source/css/**/*.css',
73+
'public/styleguide/css/*.css',
74+
'source/_patterns/**/*.mustache',
75+
'source/_patterns/**/*.json',
76+
'source/_data/*.json'
77+
],
78+
tasks: ['default']
79+
},
80+
// scss: {
8181
// files: ['source/css/**/*.scss', 'public/styleguide/css/*.scss'],
82-
// tasks: ['default']
82+
// tasks: ['sass', 'copy:css','bsReload:css']
8383
// },
84-
all: {
85-
options: {
86-
livereload: true
87-
},
84+
patterns: {
8885
files: [
89-
'source/_patterns/**/*.mustache',
90-
'source/_patterns/**/*.json',
91-
'source/_data/*.json'
86+
'source/_patterns/**/*.mustache',
87+
'source/_patterns/**/*.json',
88+
'source/_data/*.json'
9289
],
9390
tasks: ['default']
9491
}
9592
},
96-
sass: {
97-
build: {
98-
options: {
99-
style: 'expanded',
100-
precision: 8
101-
},
102-
files: {
103-
'./source/css/style.css': './source/css/style.scss',
104-
'./public/styleguide/css/static.css': './public/styleguide/css/static.scss',
105-
'./public/styleguide/css/styleguide.css': './public/styleguide/css/styleguide.scss',
106-
'./public/styleguide/css/styleguide-specific.css': './public/styleguide/css/styleguide-specific.scss'
107-
}
108-
}
109-
},
93+
// sass: {
94+
// build: {
95+
// options: {
96+
// style: 'expanded',
97+
// precision: 8
98+
// },
99+
// files: {
100+
// './source/css/style.css': './source/css/style.scss',
101+
// './public/styleguide/css/static.css': './public/styleguide/css/static.scss',
102+
// './public/styleguide/css/styleguide.css': './public/styleguide/css/styleguide.scss',
103+
// './public/styleguide/css/styleguide-specific.css': './public/styleguide/css/styleguide-specific.scss'
104+
// }
105+
// }
106+
// },
110107
nodeunit: {
111108
all: ['test/*_tests.js']
112109
},
113-
connect: {
114-
app:{
110+
browserSync: {
111+
dev: {
115112
options: {
116-
port: 9001,
117-
base: './public',
118-
hostname: 'localhost',
119-
open: true,
120-
livereload: 35729
113+
server: './public',
114+
watchTask: true,
115+
plugins: [
116+
{
117+
module: 'bs-html-injector',
118+
options: {
119+
files: './public/index.html'
120+
}
121+
}
122+
]
121123
}
122124
}
125+
},
126+
bsReload: {
127+
css: './public/**/*.css'
123128
}
124129
});
125130

@@ -130,11 +135,15 @@ module.exports = function(grunt) {
130135
grunt.task.loadTasks('./builder/');
131136

132137
//if you choose to use scss, or any preprocessor, you can add it here
133-
grunt.registerTask('default', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy']);
138+
grunt.registerTask('default', ['patternlab', /*'sass',*/ 'copy:main']);
134139

135140
//travis CI task
136-
grunt.registerTask('travis', ['nodeunit', 'clean', 'concat', 'patternlab', /*'sass',*/ 'copy']);
141+
grunt.registerTask('travis', ['nodeunit', 'patternlab']);
142+
143+
//TODO: this line is more efficient, but you cannot run concurrent watch tasks without another dependency.
144+
//grunt.registerTask('serve', ['patternlab', /*'sass',*/ 'copy:main', 'browserSync', 'watch:patterns', 'watch:scss']);
145+
grunt.registerTask('serve', ['patternlab', /*'sass',*/ 'copy:main', 'browserSync', 'watch:all']);
137146

138-
grunt.registerTask('serve', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'connect', 'watch']);
147+
grunt.registerTask('build', ['nodeunit', 'concat']);
139148

140149
};

0 commit comments

Comments
 (0)