Skip to content

Instantly share code, notes, and snippets.

@bbttxu
Created December 13, 2013 20:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbttxu/7950901 to your computer and use it in GitHub Desktop.
Save bbttxu/7950901 to your computer and use it in GitHub Desktop.
module.exports = (grunt)->
js_src_files = [ 'Scripts/**/*.js' ]
coffee_source =
'Scripts/coffee/'
grunt.initConfig
jshint:
all:
src: js_src_files
coffee:
glob_to_multiple:
expand: true
flatten: false
cwd: coffee_source
src: [ '**/*.coffee' ]
dest: 'Scripts/'
ext: '.js'
# simplemocha:
# all:
# src: [ 'test/**/*.js', 'test/**/*.coffee' ]
# options:
# globals: [ 'should' ]
#
# blanket_mocha:
# all: [ 'specs/index.html' ]
# options:
# threshold: 0
#
recess:
dist:
options:
compile: true
compress: false
noIDs: true
noJSPrefix: true
noOverqualifying: true
noUnderscores: true
noUniversalSelectors: true
prefixWhitespace: true
strictPropertyOrder: true
zeroUnits: true
docco:
debug:
src: ['Scripts/coffee/**/*.coffee']
options:
output: 'docs/'
watch:
jshint:
tasks:
"jshint"
files:
js_src_files
options:
nospawn:
true
coffee:
tasks:
"newer:coffee:glob_to_multiple"
files:
coffee_source + "**/*.coffee"
recess:
tasks:
"recess"
files:
"Content/css/**/*.css"
docco:
tasks:
"docco"
files:
"Scripts/coffee/**/*.coffee"
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
# grunt.loadNpmTasks 'grunt-simple-mocha'
# grunt.loadNpmTasks('grunt-blanket-mocha')
grunt.loadNpmTasks 'grunt-recess'
grunt.loadNpmTasks 'grunt-docco'
grunt.loadNpmTasks 'grunt-newer'
grunt.registerTask 'default', [ 'watch' ]
grunt.event.on 'watch', (action, filepath)->
grunt.config ['jshint', 'all'], filepath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment