Created
April 11, 2013 08:01
-
-
Save ohgyun/5361574 to your computer and use it in GitHub Desktop.
Gruntfile for compress javascript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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