use coffeelint

This commit is contained in:
Serene Han 2016-01-15 08:47:01 -08:00
parent 7e5e9f9f5f
commit bc1e147ca2
7 changed files with 179 additions and 25 deletions

View file

@ -1,5 +1,5 @@
fs = require 'fs'
{exec} = require 'child_process'
{spawn, exec} = require 'child_process'
# All coffeescript files required.
FILES = [
@ -9,6 +9,10 @@ FILES = [
'websocket.coffee'
'snowflake.coffee'
]
FILES_TEST = [
'snowflake_test.coffee'
]
FILES_ALL = FILES.concat FILES_TEST
OUTFILE = 'build/snowflake.coffee'
STATIC = 'static'
@ -35,6 +39,12 @@ task 'build', 'build the snowflake proxy', ->
compileCoffee()
console.log 'Snowflake prepared.'
task 'lint', 'ensure idiomatic coffeescript', ->
spawn 'coffeelint', FILES_ALL, {
file: 'coffeelint.json'
stdio: 'inherit'
}
task 'clean', 'remove all built files', ->
exec 'rm -r build'
exec 'rm -r test'