Skip to content

Commit 7fd2ff8

Browse files
Brian Muenzenmeyergeoffp
authored andcommitted
Merge pull request #13 from pattern-lab/cleanbeforebuild
clean public/patterns before build
1 parent a98c1a5 commit 7fd2ff8

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

packages/patternengine-node-twig/CHANGELOG

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

33
PL-node-v0.0.4
4-
- ADD: an explicit MIT license
4+
- ADD: An explicit MIT license
5+
- FIX: Clean public/patterns/ before build
56

67
PL-node-v0.0.3
78
- FIX: Install documentation was incomplete, should not have assumed grunt

packages/patternengine-node-twig/Gruntfile.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@ module.exports = function(grunt) {
33
// Project configuration.
44
grunt.initConfig({
55
pkg: grunt.file.readJSON('package.json'),
6-
sass: {
7-
build: {
8-
options: {
9-
style: 'expanded',
10-
precision: 8
11-
},
12-
files: {
13-
'./source/css/style.css': './source/css/style.scss',
14-
'./public/styleguide/css/static.css': './public/styleguide/css/static.scss',
15-
'./public/styleguide/css/styleguide.css': './public/styleguide/css/styleguide.scss'
16-
}
17-
}
18-
},
6+
clean: ['./public/patterns'],
197
copy: {
208
main: {
219
files: [
@@ -52,10 +40,24 @@ module.exports = function(grunt) {
5240
files: ['source/_patterns/**/*.json'],
5341
tasks: ['default']
5442
}
43+
},
44+
sass: {
45+
build: {
46+
options: {
47+
style: 'expanded',
48+
precision: 8
49+
},
50+
files: {
51+
'./source/css/style.css': './source/css/style.scss',
52+
'./public/styleguide/css/static.css': './public/styleguide/css/static.scss',
53+
'./public/styleguide/css/styleguide.css': './public/styleguide/css/styleguide.scss'
54+
}
55+
}
5556
}
5657
});
5758

5859
grunt.loadNpmTasks('grunt-contrib-copy');
60+
grunt.loadNpmTasks('grunt-contrib-clean');
5961
grunt.loadNpmTasks('grunt-contrib-watch');
6062
grunt.loadNpmTasks('grunt-contrib-sass');
6163
grunt.loadNpmTasks('grunt-contrib-jshint');
@@ -64,5 +66,5 @@ module.exports = function(grunt) {
6466
grunt.task.loadTasks('./builder/');
6567

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

packages/patternengine-node-twig/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"grunt-contrib-watch": "~0.2.0",
88
"grunt-contrib-sass": "~0.2.2",
99
"grunt-contrib-copy": "~0.4.0",
10-
"grunt-contrib-jshint": "~0.4.0"
10+
"grunt-contrib-jshint": "~0.4.0",
11+
"grunt-contrib-clean": "~0.5.0"
1112
}
1213
}

0 commit comments

Comments
 (0)