-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathCakefile
27 lines (19 loc) · 1001 Bytes
/
Cakefile
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
PROJECT = "jquery.growl"
{spawn, exec} = require "child_process"
command = (name, args...) ->
proc = spawn name, args
proc.stderr.on "data", (buffer) ->
console.log buffer.toString()
proc.stdout.on "data", (buffer) ->
console.log buffer.toString()
proc.on "exit", (status) -> process.exit(1) if status != 0
task "watch", "SASS and CoffeeScript", (options) ->
command "sass", "--watch", "--sourcemap=none", "stylesheets:stylesheets"
command "sass", "--watch", "--sourcemap=none", "spec:spec"
command "coffee", "--watch", "--compile", "--transpile", "javascripts"
command "coffee", "--watch", "--compile", "--transpile", "spec"
task "compile", "HAML", (opions) ->
command "haml", "index.haml", "index.html"
task "package", "Package CSS and JS", (options) ->
command "zip", "packages/#{PROJECT}.zip", "javascripts/#{PROJECT}.js", "stylesheets/#{PROJECT}.css"
command "tar", "-cf", "packages/#{PROJECT}.tar", "javascripts/#{PROJECT}.js", "stylesheets/#{PROJECT}.css"