Skip to content

Instantly share code, notes, and snippets.

@jincod
Last active December 16, 2015 22:39
Show Gist options
  • Save jincod/5508697 to your computer and use it in GitHub Desktop.
Save jincod/5508697 to your computer and use it in GitHub Desktop.
Complie coffee to js, run jasmine tests after coffee files changed
module.exports = (grunt) ->
grunt.initConfig
coffee:
compile:
files:
'src/src.js': ['src/*.coffee']
'specs/specs.js': ['specs/*.coffee']
jasmine:
src: ['src/**/*.js']
options:
specs: "./specs/**/*.js"
watch:
specs:
files: ["src/**/*.coffee", "specs/**/*.coffee"]
tasks: ["coffee", "jasmine"]
grunt.loadNpmTasks 'grunt-contrib-jasmine'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.registerTask 'default', 'coffee'
grunt.registerTask "tests", ["jasmine"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment