Created
August 4, 2014 16:33
-
-
Save hdemon/ceef45a8614d9cb8e467 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
"use strict" | |
module.exports = (grunt) -> | |
require('load-grunt-tasks')(grunt) | |
grunt.initConfig | |
coffee: | |
source: | |
expand: true, | |
cwd: 'lib/', | |
src: ['**/*.coffee'], | |
dest: 'dist/', | |
ext: '.js' | |
watch: | |
test: | |
files: [ | |
"lib/**/*.coffee" | |
"<%= mochaTest.all.src %>" | |
] | |
options: | |
spawn: false | |
mochaTest: | |
all: | |
options: | |
reporter: 'spec' | |
clearRequireCache: true | |
timeout: 5000 | |
ui: 'bdd' | |
require: 'coffee-script/register' | |
compilers: 'coffee:coffee-script/register' | |
src: ['test/**/*.coffee'] | |
grunt.event.on 'watch', (action, filepath) -> | |
grunt.config 'mochaTest.all.src', [filepath] | |
grunt.task.run "mochaTest" | |
grunt.registerTask "default", ["watch"] | |
grunt.registerTask "build", ["coffee:source"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment