Created
August 6, 2011 23:14
-
-
Save robflaherty/1129871 to your computer and use it in GitHub Desktop.
CoffeeScript and Stylus watch/build cakefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CoffeeScript and Stylus watch/build cakefile | |
{spawn, exec} = require 'child_process' | |
task 'assets:watch', 'Watch source files and build JS & CSS', (options) -> | |
runCommand = (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 isnt 0 | |
runCommand 'coffee', '-wc', '-o', 'app/build/', 'app/src/' | |
runCommand 'stylus', '-w', 'app/src', '-o', 'app/build' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems to work well with a couple of mods thanks.