Skip to content

Instantly share code, notes, and snippets.

@alemohamad
Last active May 16, 2019 16:36
Show Gist options
  • Save alemohamad/4dd749296542d7f1d18192647a72a6a1 to your computer and use it in GitHub Desktop.
Save alemohamad/4dd749296542d7f1d18192647a72a6a1 to your computer and use it in GitHub Desktop.
grunt example file
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: 'src/<%= pkg.name %>.js',
dest: 'build/<%= pkg.name %>.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