forked from dmotz/oriDomi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCakefile
More file actions
26 lines (17 loc) · 694 Bytes
/
Cakefile
File metadata and controls
26 lines (17 loc) · 694 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
{exec, spawn} = require 'child_process'
output = (data) ->
console.log data.toString()
task 'build', 'Build, minify, and generate docs for oriDomi', ->
exec 'coffee -c oriDomi.coffee', (err, stdout, stderr) ->
throw err if err
console.log stdout, stderr
exec 'uglifyjs -o oriDomi.min.js oriDomi.js', (err, stdout, stderr) ->
throw err if err
console.log stdout, stderr
exec 'docco oriDomi.coffee', (err, stdout, stderr) ->
throw err if err
console.log stdout, stderr
task 'watch', 'Build oriDomi continuously', ->
coffee = spawn 'coffee', ['-wc', 'oriDomi.coffee']
coffee.stdout.on 'data', output
coffee.stderr.on 'data', output