diff --git a/Gruntfile.js b/Gruntfile.js index 59a1631..20a186a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -10,6 +10,9 @@ module.exports = function (grunt) { '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', + clean: { + files: ['min'] + }, // Task configuration. uglify: { options: { @@ -65,6 +68,7 @@ module.exports = function (grunt) { // These plugins provide necessary tasks. grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-csslint'); grunt.loadNpmTasks('grunt-contrib-cssmin'); @@ -76,6 +80,6 @@ module.exports = function (grunt) { }); grunt.registerTask('lint', ['jshint', 'csslint']); - grunt.registerTask('build', ['uglify', 'cssmin']); + grunt.registerTask('build', ['clean', 'uglify', 'cssmin']); }; diff --git a/package.json b/package.json index 97b262e..3c4fb5f 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "grunt-contrib-jshint": "~0.1.1", "grunt-contrib-uglify": "~0.1.1", "grunt-contrib-cssmin": "~0.6.1", - "grunt-contrib-csslint": "~0.1.2" + "grunt-contrib-csslint": "~0.1.2", + "grunt-contrib-clean": "~0.4.1" } }