Last active
December 16, 2015 09:29
-
-
Save ctoestreich/5413680 to your computer and use it in GitHub Desktop.
Gruntfile coffeescript
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
gruntFunction = (grunt) -> | |
gruntConfig = | |
coffee: | |
app: | |
src: ["js/**/*.coffee"] | |
options: | |
bare: true | |
preserve_dirs: true | |
testjs: | |
src: ["test-js/**/*.coffee"] | |
options: | |
bare: true | |
preserve_dirs: true | |
watch: | |
files: ["<config:coffee.app.src>", "<config:coffee.testjs.src>"] | |
tasks: ["coffee:app", "coffee:testjs"] | |
coffeeLint: | |
app: | |
src: "<config:coffee.app.src>" | |
indentation: | |
value: 2 | |
level: "warn" | |
no_trailing_whitespace: | |
level: "error" | |
no_trailing_semicolons: | |
level: "error" | |
no_plusplus: | |
level: "warn" | |
no_implicit_parens: | |
level: "ignore" | |
max_line_length: | |
level: "ignore" | |
testjs: | |
src: "<config:coffee.testjs.src>" | |
indentation: | |
value: 2 | |
level: "warn" | |
no_trailing_whitespace: | |
level: "error" | |
no_trailing_semicolons: | |
level: "error" | |
no_plusplus: | |
level: "warn" | |
no_implicit_parens: | |
level: "ignore" | |
max_line_length: | |
level: "ignore" | |
grunt.initConfig gruntConfig | |
grunt.loadNpmTasks 'grunt-hustler' | |
grunt.loadTasks 'tasks' | |
grunt.registerTask 'default', 'coffee watch' | |
grunt.registerTask 'cw', 'coffee watch' | |
grunt.registerTask 'c', 'coffee' | |
grunt.registerTask 'lint', 'coffeeLint' | |
null | |
#debug : call with a dummy 'grunt', that spits params on console.log | |
#gruntFunction | |
# initConfig: (cfg)-> console.log 'grunt: initConfig\n', JSON.stringify cfg, null, ' ' | |
# loadNpmTasks: (tsk)-> console.log 'grunt: registerTask: ', tsk | |
# registerTask: (shortCut, task)-> console.log 'grunt: registerTask:', shortCut, task | |
module.exports = gruntFunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment