-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCakefile
28 lines (23 loc) · 1018 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
fs = require 'fs'
option '-o', '--output [DIR]', 'output dir'
DEFAULT_OUTPUT_DIR = 'lib'
{print} = require 'sys'
{spawn} = require 'child_process'
task 'build', 'Build dist/ from src/', (options) ->
coffee = spawn 'coffee', ['--compile', '--bare', '--output', options.output? or DEFAULT_OUTPUT_DIR, 'src']
coffee.stderr.on 'data', (data) ->
process.stderr.write data.toString()
coffee.stdout.on 'data', (data) ->
print data.toString()
task 'doc', 'Build the documentation', (options) ->
docco = spawn 'docco', ["src/editors/autoselect.coffee"]
docco.stderr.on 'data', (data) ->
process.stderr.write data.toString()
docco.stdout.on 'data', (data) ->
print data.toString()
task 'watch', 'Watch src/ for changes', (options) ->
coffee = spawn 'coffee', ['--watch', '--compile', '--bare', '--output', options.output? or DEFAULT_OUTPUT_DIR, 'src']
coffee.stderr.on 'data', (data) ->
process.stderr.write data.toString()
coffee.stdout.on 'data', (data) ->
print data.toString()