adding a cake:bench task

This commit is contained in:
Jeremy Ashkenas 2010-09-26 10:38:28 -04:00
parent 45bd0854b6
commit 008d2ba0d3
1 changed files with 3 additions and 0 deletions

View File

@ -87,6 +87,9 @@ task 'doc:underscore', 'rebuild the Underscore.coffee documentation page', ->
exec 'docco examples/underscore.coffee && cp -rf docs documentation && rm -r docs', (err) ->
throw err if err
task 'bench', 'quick benchmark of compilation time (of everything in src)', ->
exec 'time bin/coffee -p src/ > /dev/null', (err, stdout, stderr) ->
print stderr
task 'loc', 'count the lines of source code in the CoffeeScript compiler', ->
sources = ['src/coffee-script.coffee', 'src/grammar.coffee', 'src/helpers.coffee', 'src/lexer.coffee', 'src/nodes.coffee', 'src/rewriter.coffee', 'src/scope.coffee']