From b674163a40d94fcb2001aae511fd07285697812c Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Wed, 17 Feb 2010 00:22:06 -0500 Subject: [PATCH] adding build:ultraviolet and build:underscore tasks to the Cakefile --- Cakefile | 8 ++++++++ documentation/underscore.html | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Cakefile b/Cakefile index f0f0268e..c9192470 100644 --- a/Cakefile +++ b/Cakefile @@ -22,6 +22,14 @@ task 'build:parser', 'rebuild the Jison parser', -> fs.write(fd, js) +task 'build:ultraviolet', 'build and install the Ultraviolet syntax highlighter', -> + exec('plist2syntax extras/CoffeeScript.tmbundle/Syntaxes/CoffeeScript.tmLanguage').addCallback -> + exec 'sudo mv coffeescript.yaml /usr/local/lib/ruby/gems/1.8/gems/ultraviolet-0.10.2/syntax/coffeescript.syntax' + + +task 'build:underscore', 'rebuild the Underscore.coffee documentation page', -> + exec 'uv -s coffeescript -t idle -h examples/underscore.coffee > documentation/underscore.html' + task 'test', 'run the CoffeeScript language test suite', -> process.mixin require 'assert' test_count: 0 diff --git a/documentation/underscore.html b/documentation/underscore.html index 814fda02..42bb7bf4 100644 --- a/documentation/underscore.html +++ b/documentation/underscore.html @@ -262,7 +262,7 @@ 240 241 242 # Trim out all falsy values from an array. - 243 _.compact: (array) -> array[i] for i in [0...array.length] when array[i] + 243 _.compact: (array) -> item for item in array when item 244 245 246 # Return a completely flattened version of an array. @@ -334,8 +334,8 @@ 312 _.range: (start, stop, step) -> 313 a: arguments 314 solo: a.length <= 1 - 315 i: start: if solo then 0 else a[0]; - 316 stop: if solo then a[0] else a[1]; + 315 i: start: if solo then 0 else a[0] + 316 stop: if solo then a[0] else a[1] 317 step: a[2] or 1 318 len: Math.ceil((stop - start) / step) 319 return [] if len <= 0