Skip to content

Commit

Permalink
VP-310: Added minification
Browse files Browse the repository at this point in the history
Using uglify to minify the concatenated file. Also changed the build task to build-src.
  • Loading branch information
jobara committed May 3, 2013
1 parent 70b3afd commit d5cccdf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 14 additions & 2 deletions GruntFile.js
Expand Up @@ -24,12 +24,24 @@ module.exports = function (grunt) {
],
dest: "build/videoPlayer-all.js"
}
},
uglify: {
options: {
mangle: false
},
my_target: {
files: {
"build/videoPlayer-all-min.js": ["build/videoPlayer-all.js"]
}
}
}
});

grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-uglify");

grunt.registerTask("build", ["clean", "concat"]);
grunt.registerTask("default", ["build"]);
grunt.registerTask("build-src", ["clean", "concat"]);
grunt.registerTask("build-min", ["build-src", "uglify"]);
grunt.registerTask("default", ["build-min"]);
};
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -30,6 +30,7 @@
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-clean": "~0.4.1",
"grunt-contrib-concat": "~0.3.0"
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.0"
}
}

0 comments on commit d5cccdf

Please sign in to comment.