Skip to content

Instantly share code, notes, and snippets.

@flashingpumpkin
Created May 2, 2012 09:34
Show Gist options
  • Select an option

  • Save flashingpumpkin/2575539 to your computer and use it in GitHub Desktop.

Select an option

Save flashingpumpkin/2575539 to your computer and use it in GitHub Desktop.
{spawn} = require 'child_process'
log = (data)->
process.stdout.write data.toString()
out = (obj)->
obj.stdout.on 'data', log
obj.stderr.on 'data', log
task 'develop', 'Run a dev server', ->
console.log 'Starting server'
httpd = spawn 'python', ['-m', 'SimpleHTTPServer', '8000']
coffee = spawn 'coffee', ['-w', '-o', 'lib/', '-c', 'src/']
tests = spawn 'coffee', ['-w', '-o', 'test/', '-c', 'test/']
out httpd
out coffee
out tests
spawn 'google-chrome', ['http://localhost:8000/test/test.html']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment