Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 33 lines (26 sloc) 0.917 kB
3b5f8d6 @infynyxx removing require.paths
infynyxx authored
1 #require.paths.unshift "#{__dirname}/node_modules"
ba557df @infynyxx initial commit
infynyxx authored
2
3 {spawn, exec} = require 'child_process'
3b5f8d6 @infynyxx removing require.paths
infynyxx authored
4 {print} = require 'util'
ba557df @infynyxx initial commit
infynyxx authored
5
6 build = (watch, callback) ->
7 if typeof watch is 'function'
8 callback = watch
9 watch = false
10 options = ['-c', '-o', 'lib', 'src']
11 options.unshift '-w' if watch
12
13 coffee = spawn 'coffee', options
14 coffee.stdout.on 'data', (data) ->
15 print data.toString()
16 coffee.stderr.on 'data', (data) ->
17 print data.toString()
18 coffee.on 'exit', (status) ->
19 callback?() if status is 0
20
21 task 'build', 'Compile CoffeScript source files', ->
22 build()
23
24 task 'watch', 'Recompile CoffeScript when source files are modified', ->
25 build true
26
27 task 'test', 'Run the test suite', ->
28 build ->
3b5f8d6 @infynyxx removing require.paths
infynyxx authored
29 #require.paths.unshift __dirname + '/lib'
ba557df @infynyxx initial commit
infynyxx authored
30 {reporters} = require 'nodeunit'
31 process.chdir __dirname
32 reporters.default.run ['test']
Something went wrong with that request. Please try again.