Browse Source

Use grunt-newer to quickly package and minify modified watched files

pull/954/head
sami-t 10 years ago
parent
commit
0d19a1890b
2 changed files with 16 additions and 2 deletions
  1. 15
      src/Gruntfile.js
  2. 3
      src/package.json

15
src/Gruntfile.js

@ -20,7 +20,19 @@ module.exports = function(grunt) {
'copy:file',
// auto prefix outputted file
'autoprefixer:prefixFile'
'autoprefixer:prefixFile',
// creates minified js of outputted file if it is js
'newer:uglify:minifyOutput',
// creates minified css of outputted file if it is css
'newer:cssmin:minifyOutput',
// create concatenated css release if outputted file is css
'newer:concat:createCSSPackage',
// create concatenated js release if outputted file is js
'newer:concat:createJSPackage'
],
resetTasks = [
@ -296,6 +308,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-clear');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-newer');
// css
grunt.loadNpmTasks('grunt-contrib-cssmin');

3
src/package.json

@ -15,6 +15,7 @@
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-clear": "~0.2.1",
"grunt-autoprefixer": "~0.4.0"
"grunt-autoprefixer": "~0.4.0",
"grunt-newer": "~0.7.0"
}
}
Loading…
Cancel
Save