Created
June 11, 2015 09:08
-
-
Save magnet88jp/9335ed819117c4a619c1 to your computer and use it in GitHub Desktop.
Gruntfile for concat and ugilfy
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({ | |
concat: { | |
files: { | |
// write source files | |
src : 'js/*.js', | |
// 順序指定する場合は配列で渡す | |
// src : [ | |
// 'js/src2.js', | |
// 'js/src1.js', | |
// ], | |
// output filename | |
dest: 'output/concat/hogehoge.js' | |
} | |
}, | |
uglify: { | |
dist: { | |
files: { | |
// output file: original | |
'output/min/hogehoge-min.js': 'output/concat/hogehoge.js' | |
} | |
} | |
} | |
}); | |
// load plugins. | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
// regist default task. | |
grunt.registerTask('default', ['concat', 'uglify']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment