Cakefile
raw| 1 | {spawn, exec} = require 'child_process' |
| 2 | |
| 3 | task 'build', 'continually build the JavaScript code', -> |
| 4 | coffeeScript = if process.platform == 'win32' then 'coffee.cmd' else 'coffee' |
| 5 | coffee = spawn coffeeScript, ['-cw', '-o', 'lib', 'src'] |
| 6 | coffee.stdout.on 'data', (data) -> console.log data.toString().trim() |
| 7 | |
| 8 | task 'doc', 'rebuild the Docco documentation', -> |
| 9 | exec([ |
| 10 | 'docco src/xml2js.coffee' |
| 11 | ].join(' && '), (err) -> |
| 12 | throw err if err |
| 13 | ) |