-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathCakefile
More file actions
24 lines (21 loc) · 785 Bytes
/
Cakefile
File metadata and controls
24 lines (21 loc) · 785 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
{spawn, exec} = require 'child_process'
task 'watch', 'Build and watch the CoffeeScript source files', ->
coffee = spawn 'coffee', ['-cw', '-o', 'lib', 'src']
test = spawn 'coffee', ['-cw', 'test']
log = (d)-> console.log d.toString()
coffee.stdout.on 'data', log
test.stdout.on 'data', log
task 'compile', 'Compile to js library', ->
console.log 'compiling...'
exec 'coffee --compile --output lib/ src/', (err, res)->
if err
console.error 'failed with', err
else
console.log 'compile complete', res
task 'build', 'Build minified file with uglify', ->
console.log 'building...'
exec 'uglifyjs -m -o jqconsole.min.js lib/jqconsole.js', (err, res)->
if err
console.error 'failed with', err
else
console.log 'build complete'