Created
July 17, 2013 06:28
-
-
Save blmarket/6018104 to your computer and use it in GitHub Desktop.
one of another Gruntfile example.
Gruntfile용 example이 생각보다 많지 않아서 올려둔다.
원래 requirejs도 사용했었으나 필요가 없어져서 다시 빼버림.
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 = (grunt) -> | |
grunt.initConfig { | |
pkg: grunt.file.readJSON('package.json') | |
coffee: { | |
compile: { | |
options: { | |
bare: true | |
} | |
files: { | |
'public/dist/plugin.js': 'public/collector/plugin.coffee' | |
} | |
} | |
} | |
concat: { | |
options: { separator: ';' } | |
dist: { | |
src: [ 'public/dist/plugin.js', 'public/collector/mall.js' ] | |
dest: 'public/dist/production.js' | |
} | |
} | |
uglify: { | |
options: { | |
mangle: {} # default option, set to false if you wanna preserve class names. | |
} | |
my_target: { | |
files: { | |
'public/dist/production.min.js' : [ 'public/dist/plugin.js', 'public/collector/mall.js' ] | |
} | |
} | |
} | |
} | |
grunt.loadNpmTasks 'grunt-contrib-coffee' | |
grunt.loadNpmTasks 'grunt-contrib-concat' | |
grunt.loadNpmTasks 'grunt-contrib-uglify' | |
grunt.registerTask 'uncompressed', [ 'coffee', 'concat' ] | |
grunt.registerTask 'default', [ 'coffee', 'uglify' ] # uglify supports concat, so we don't use it. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment