Permalink
Browse files

Restore to stock style

  • Loading branch information...
1 parent 7d8bf07 commit abdec712519437c8b2d7a780b5e4e72ac7a1a182 Wu Zhe committed Jul 6, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 Cakefile
View
@@ -13,27 +13,27 @@ green = "\033[0;32m"
reset = "\033[0m"
# Log a message with a color.
-log = (message, color, explanation) ->
+log = (message, color, explanation)->
console.log color + message + reset + ' ' + (explanation or '')
# Handle error and kill the process.
-onerror = (err) ->
+onerror = (err)->
if err
process.stdout.write "#{red}#{err.stack}#{reset}\n"
process.exit -1
## Building ##
-build = (callback) ->
+build = (callback)->
log "Compiling CoffeeScript to JavaScript ...", green
- exec "rm -rf lib && coffee -c -l -b -o lib src", (err, stdout) -> onerror err
- exec "coffee -c -l -b -o spec/lib spec", (err, stdout) -> onerror err
+ exec "rm -rf lib && coffee -c -l -b -o lib src", (err, stdout)-> onerror err
+ exec "coffee -c -l -b -o spec/lib spec", (err, stdout)-> onerror err
task "build", "Compile CoffeeScript to JavaScript", -> build onerror
task "watch", "Continously compile CoffeeScript to JavaScript", ->
cmd = spawn("coffee", ["-cw", "-o", "lib", "src"])
- cmd.stdout.on "data", (data) -> process.stdout.write green + data + reset
+ cmd.stdout.on "data", (data)-> process.stdout.write green + data + reset
cmd.on "error", onerror
cmdTest = spawn("coffee", ["-cw", "-o", "spec/lib", "spec"])
@@ -52,10 +52,10 @@ task "prepare", "Download vendor files", ->
## Documentation ##
-generateDocs = (callback) ->
+generateDocs = (callback)->
log "Generating documentation ...", green
exec "rm -rf docs && docco src/*.coffee && mv docs/backrub.html
- docs/index.html", (err, stdout) -> onerror err
+ docs/index.html", (err, stdout)-> onerror err
task "doc", "Generate all documentation", -> generateDocs onerror

0 comments on commit abdec71

Please sign in to comment.