Skip to content

Instantly share code, notes, and snippets.

@octosteve
Created December 8, 2012 23:34
Show Gist options
  • Save octosteve/4242523 to your computer and use it in GitHub Desktop.
Save octosteve/4242523 to your computer and use it in GitHub Desktop.
Used to lint and test files
{spawn, exec} = require 'child_process'
task 'lint', 'Lint Everything', ->
lint_command = "./node_modules/.bin/coffeelint -r Cakefile ."
lint = exec lint_command, (error, stdout, stderr) ->
console.log stdout.toString()
console.log stderr.toString()
if error isnt null
console.log "Errors prevented your task from continuing"
process.exit(1)
console.log "All Tests passed!"
task 'test', 'Test Everything', ->
invoke 'lint'
reporter = require('nodeunit').reporters['default']
reporter.run ['src/server/_server_test.coffee']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment