Skip to content

Commit ee7d27c

Browse files
committed
Add coffee grunt task, split test from watch task
1 parent 963223d commit ee7d27c

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

Gruntfile.coffee

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
module.exports = (grunt) ->
22

33
grunt.initConfig
4+
5+
coffee:
6+
options:
7+
bare: true
8+
compile:
9+
files: [
10+
expand: true
11+
cwd: "./lib"
12+
src: ["**/*.coffee"]
13+
dest: "./lib"
14+
ext: ".js"
15+
]
16+
417
mochacli:
518
test:
619
options:
@@ -14,10 +27,12 @@ module.exports = (grunt) ->
1427
watch:
1528
tests:
1629
files: ['test/**/*.coffee', 'lib/**/*.coffee']
17-
tasks: ['mochacli']
30+
tasks: ['coffee', 'mochacli']
1831

1932

2033
grunt.loadNpmTasks('grunt-mocha-cli')
2134
grunt.loadNpmTasks('grunt-contrib-watch')
35+
grunt.loadNpmTasks('grunt-contrib-coffee')
2236

23-
grunt.registerTask('test', ['mochacli', 'watch'])
37+
grunt.registerTask('test', ['coffee', 'mochacli'])
38+
grunt.registerTask('default', ['test', 'watch'])

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"coffee-script": "^1.7.1",
1717
"grunt": "^0.4.5",
1818
"grunt-cli": "^0.1.13",
19+
"grunt-contrib-coffee": "^0.12.0",
1920
"grunt-contrib-watch": "^0.6.1",
2021
"grunt-mocha-cli": "^1.11.0",
2122
"mocha": "^1.18.2"

0 commit comments

Comments
 (0)