Skip to content

Instantly share code, notes, and snippets.

@cyclopslabs
Last active January 4, 2016 14:39
Show Gist options
  • Save cyclopslabs/8635656 to your computer and use it in GitHub Desktop.
Save cyclopslabs/8635656 to your computer and use it in GitHub Desktop.
Sample Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['js/**/*.js', 'js/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['concat', 'uglify']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment