Uh oh!
There was an error while loading. Please reload this page.
forked from moul/node-gitlab
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCakefile
More file actions
Latest commit
31 lines (24 loc) · 989 Bytes
/
Copy pathCakefile
File metadata and controls
31 lines (24 loc) · 989 Bytes
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
29
30
31
{spawn, exec} =require'child_process'
coffee='./node_modules/.bin/coffee'
call= (command, args= [], fn=null) ->
exec"#{command}#{args.join('')}", (err, stdout, stderr) ->
if err?
console.error"Error :"
returnconsole.dir err
fn err if fn
system= (command, args) ->
spawn command, args, stdio:"inherit"
build= (fn=null) ->
call coffee, ['-c', '--no-header', '-o', 'lib', 'src']
call coffee, ['-c', '--no-header', '-o', 'examples', 'examples']
call coffee, ['-c', '--no-header', '-o', 'tests', 'tests']
watch= (fn=null) ->
system coffee, ['-w', '--no-header', '-c', '-o', 'lib', 'src']
system coffee, ['-w', '--no-header', '-c', '-o', 'examples', 'examples']
system coffee, ['-w', '--no-header', '-c', '-o', 'tests', 'tests']
task'watch', 'continually build the JavaScript code', ->
watch->
console.log"Done !"
task'build', 'build the JavaScript code', ->
build->
console.log"Done !"