Skip to content

Instantly share code, notes, and snippets.

@jeffreysbrother
Created October 5, 2015 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffreysbrother/2873672d18e582faaf21 to your computer and use it in GitHub Desktop.
Save jeffreysbrother/2873672d18e582faaf21 to your computer and use it in GitHub Desktop.
Gruntfile.js boilerplate
module.exports = function(grunt) {
//project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'js/script.js',
dest: 'script.min.js'
}
}
});
//load the plugin that provides the 'uglify' task
grunt.loadNpmTasks('grunt-contrib-uglify');
//default task(s)
grunt.registerTask('default', ['uglify']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment