-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCakefile
More file actions
33 lines (26 loc) · 777 Bytes
/
Copy pathCakefile
File metadata and controls
33 lines (26 loc) · 777 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
32
33
# Module requires
{spawn, exec} = require 'child_process'
sys = require 'sys'
# ## Helpers
# Helper function for showing error messages if anyting happens
printOutput = (process) ->
process.stdout.on 'data', (data) -> sys.print data
process.stderr.on 'data', (data) -> sys.print data
# Watch Javascript for changes
watchJS = ->
coffee = exec 'coffee -cw -o ./ src/'
printOutput(coffee)
runTests = ->
expresso = exec 'expresso -b test/*.test.js'
printOutput(expresso)
# Tasks
task 'watch', 'Watches all Coffeescript(JS) and Stylus(CSS) files', ->
watchJS()
task 'docs', 'Create documentation using Docco', ->
docco = exec """
docco src/index.coffee
"""
printOutput(docco)
task 'sbuild', 'Build task for Sublime Text', ->
watchJS()
# runTests()