Skip to content

Instantly share code, notes, and snippets.

@ohgyun
Created April 11, 2013 08:01
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 ohgyun/5361574 to your computer and use it in GitHub Desktop.
Save ohgyun/5361574 to your computer and use it in GitHub Desktop.
Gruntfile for compress javascript.
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
banner: '/*! <%= pkg.name %> - <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd") %>) */\n\n',
separator: '\n'
},
build: {
files: {
'build/file-<%= pkg.version %>.js': [
'src/intro.js',
'src/outro.js'
]
}
}
},
uglify: {
build: {
files: {
'build/file-<%= pkg.version %>.min.js': 'build/wave-<%= pkg.version %>.js'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('build', ['concat', 'uglify']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment