Skip to content

Commit

Permalink
my first original grunt task
Browse files Browse the repository at this point in the history
  • Loading branch information
buzzdecafe committed Sep 26, 2013
1 parent 5af4ff6 commit 26c21ab
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,21 @@ module.exports = function(grunt) {
{src: ['app/**', 'VERSION', 'manifest.webapp']}, // includes files in path and its subdirs
]
}
}
},

});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-compress');

grunt.registerTask('version', 'Write a VERSION file to include in the archive', function() {
var now = new Date();
var pkg = grunt.config('pkg');
var contents = 'version ' + pkg.version + '\nBuilt: ' + now + '\n';
grunt.file.write('VERSION', contents);
});
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('build', ['compress:main']);
grunt.registerTask('build', ['version', 'compress:main']);
};

0 comments on commit 26c21ab

Please sign in to comment.