Skip to content

Instantly share code, notes, and snippets.

@yuichi-tanaka
Last active August 29, 2015 14:13
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 yuichi-tanaka/155f14155a0a2a67c39d to your computer and use it in GitHub Desktop.
Save yuichi-tanaka/155f14155a0a2a67c39d to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat:{
hikajs: {
src: [
'source/main.sample.js',
'source/main2.sample.js',
],
dest: 'build/concat.hikarabo.js',
nonull: true
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'build/concat.hikarabo.js',
dest: 'build/<%= pkg.name %>.min.js'
}
},
copy:{
main: {
src:'build/*.min.js',
dest: 'public/js/'
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('default',['concat:hikajs','uglify','copy']);
grunt.registerTask('default:concat', ['concat:hikajs']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment