From 374b5649745dd486fee80e3260948db1c633825a Mon Sep 17 00:00:00 2001 From: "Mr. Hyde" Date: Tue, 28 Apr 2015 04:09:03 +0200 Subject: [PATCH] - [grunt] introduced grunt uglify task --- gruntfile.coffee | 4 ++++ package.json | 3 ++- tasks/grunt-contrib-uglify.coffee | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tasks/grunt-contrib-uglify.coffee diff --git a/gruntfile.coffee b/gruntfile.coffee index 822d3737..4ab0cfc2 100644 --- a/gruntfile.coffee +++ b/gruntfile.coffee @@ -50,9 +50,13 @@ module.exports = (grunt) -> # Specify files file: source: + script: '<%= path.source.scripts %>/main.js' style: '<%= path.source.styles %>/style.scss' build: + script: + compiled: '<%= path.build.scripts %>/main.js' + min: '<%= path.build.scripts %>/main.min.js' style: compiled: '<%= path.build.styles %>/style.compiled.css' prefixed: '<%= path.build.styles %>/style.prefixed.css' diff --git a/package.json b/package.json index f2bc220d..fb24f286 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Kotsu", - "version": "0.7.0", + "version": "0.7.1", "title": "Clean, opinionated foundation for new projects — to boldly go where no man has gone before", "author": "LotusTM", "private": true, @@ -15,6 +15,7 @@ "grunt-contrib-copy": "^0.8.0", "grunt-contrib-htmlmin": "^0.4.0", "grunt-contrib-sass": "^0.9.2", + "grunt-contrib-uglify": "^0.9.1", "grunt-contrib-watch": "^0.6.1", "grunt-csso": "^0.7.1", "grunt-newer": "^1.1.0", diff --git a/tasks/grunt-contrib-uglify.coffee b/tasks/grunt-contrib-uglify.coffee new file mode 100644 index 00000000..7166de05 --- /dev/null +++ b/tasks/grunt-contrib-uglify.coffee @@ -0,0 +1,12 @@ +### +Uglify +https://github.com/gruntjs/grunt-contrib-uglify +Minify files with UglifyJS +### +module.exports = -> + @config 'uglify', + build: + files: [ + src: '<%= file.build.script.compiled %>' + dest: '<%= file.build.script.min %>' + ] \ No newline at end of file