Skip to content

Commit

Permalink
Added a clean grunt task to ensure pristine builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
keithclark committed Jan 4, 2016
1 parent 52a1422 commit 54f6437
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,18 @@ module.exports = function(grunt) {
grunt.registerTask('core', 'Builds the shared Google Analytics Core scripts.', ['jshint:core', 'nodeunit:core', 'concat:core']);
grunt.registerTask('chrome', 'Builds the GA Debugger extension for Google Chrome.', ['jshint:chrome', 'concat:chromeJS', 'concat:chromeCSS', 'copy:chrome']);
grunt.registerTask('firefox', 'Builds the GA Debugger extension for Firefox.', ['concat:firefoxJS', 'copy:firefox']);
grunt.registerTask('dist', 'Builds the GA Debugger extensions', function() {
grunt.registerTask('build', 'Builds the GA Debugger extension for all browsers', ['core', 'chrome', 'firefox']);
grunt.registerTask('dist', 'Builds a fresh set of distributable extension files', ['clean', 'build', 'package']);
grunt.registerTask('default', 'Builds everything and watches for changes', ['build', 'watch']);

grunt.registerTask('clean', 'Empties/creates the `build` and `dist` directories', function() {
grunt.file.delete('build');
grunt.file.delete('dist');
grunt.file.mkdir('build');
grunt.file.mkdir('dist');
});

grunt.registerTask('package', 'Package the builds into installable extensions', function() {
var exec = require('child_process').exec,
fs = require('fs'),
done = grunt.task.current.async(),
Expand Down Expand Up @@ -306,7 +317,4 @@ module.exports = function(grunt) {
});

});

grunt.registerTask('default', 'Builds everything and watches for changes', ['core', 'chrome', 'firefox', 'watch']);

};

0 comments on commit 54f6437

Please sign in to comment.