Created
December 8, 2012 23:34
-
-
Save octosteve/4242523 to your computer and use it in GitHub Desktop.
Used to lint and test files
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
{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