forked from amir20/phantomjs-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCakefile
More file actions
24 lines (21 loc) · 651 Bytes
/
Cakefile
File metadata and controls
24 lines (21 loc) · 651 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
{exec} = require 'child_process'
bin = "./node_modules/.bin"
run = (cmds...) ->
exec cmds.join(' && '), (err, stdout, stderr) ->
stderr = stderr.trim()
stdout = stdout.trim()
console.log stderr if stderr
console.log stdout if stdout
if err
console.log "Failed."
else
console.log "Great success!"
task "build", "coffee-compile and browserify phantom", ->
run(
"#{bin}/coffee -c phantom.coffee"
"rm shim.js"
"#{bin}/browserify shim.coffee -o .shim.js"
"cat pre_shim.js .shim.js > shim.js"
"rm .shim.js"
)
task "test", "run phantom's unit tests", -> run "#{bin}/vows --spec test/*.coffee"