Skip to content

Commit

Permalink
Merge pull request #13 from pattern-lab/cleanbeforebuild
Browse files Browse the repository at this point in the history
clean public/patterns before build
  • Loading branch information
Brian Muenzenmeyer authored and bmuenzenmeyer committed Feb 23, 2018
1 parent 9b17021 commit e8cae7f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
3 changes: 2 additions & 1 deletion packages/patternengine-node-underscore/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.

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

PL-node-v0.0.3
- FIX: Install documentation was incomplete, should not have assumed grunt
Expand Down
30 changes: 16 additions & 14 deletions packages/patternengine-node-underscore/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,7 @@ module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
build: {
options: {
style: 'expanded',
precision: 8
},
files: {
'./source/css/style.css': './source/css/style.scss',
'./public/styleguide/css/static.css': './public/styleguide/css/static.scss',
'./public/styleguide/css/styleguide.css': './public/styleguide/css/styleguide.scss'
}
}
},
clean: ['./public/patterns'],
copy: {
main: {
files: [
Expand Down Expand Up @@ -52,10 +40,24 @@ module.exports = function(grunt) {
files: ['source/_patterns/**/*.json'],
tasks: ['default']
}
},
sass: {
build: {
options: {
style: 'expanded',
precision: 8
},
files: {
'./source/css/style.css': './source/css/style.scss',
'./public/styleguide/css/static.css': './public/styleguide/css/static.scss',
'./public/styleguide/css/styleguide.css': './public/styleguide/css/styleguide.scss'
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-jshint');
Expand All @@ -64,5 +66,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', ['patternlab', /*'sass',*/ 'copy']);
grunt.registerTask('default', ['clean', 'patternlab', /*'sass',*/ 'copy']);
};
3 changes: 2 additions & 1 deletion packages/patternengine-node-underscore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"grunt-contrib-watch": "~0.2.0",
"grunt-contrib-sass": "~0.2.2",
"grunt-contrib-copy": "~0.4.0",
"grunt-contrib-jshint": "~0.4.0"
"grunt-contrib-jshint": "~0.4.0",
"grunt-contrib-clean": "~0.5.0"
}
}

0 comments on commit e8cae7f

Please sign in to comment.