From 6ae21ae461fcf9ccca40dc856c0142b6fe172a34 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Thu, 8 May 2014 15:07:42 -0400 Subject: [PATCH 1/3] merged --- CONTRIBUTING.md | 6 ++--- Cakefile | 29 +++++++++++++++++++- documentation/index.html.js | 32 +++++++++++----------- index.html | 54 ++++++++++++++++++------------------- package.json | 4 +-- 5 files changed, 76 insertions(+), 49 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6390c68b..5ea4c5f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,9 @@ ## How to contribute to CoffeeScript -* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffee-script/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. +* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffeescript/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. -* Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffee-script/tree/master/test). +* Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffeescript/tree/master/test). -* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffee-script/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide). +* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffeescript/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide). * In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release. \ No newline at end of file diff --git a/Cakefile b/Cakefile index 7efec7a8..1ce2fd47 100644 --- a/Cakefile +++ b/Cakefile @@ -65,6 +65,33 @@ codeFor = -> button = if executable then "
#{run}
" else '' "
#{cshtml}#{jshtml}#{script}#{load}#{button}
" +monthNames = [ + 'January' + 'February' + 'March' + 'April' + 'May' + 'June' + 'July' + 'August' + 'September' + 'October' + 'November' + 'December' +] + +formatDate = (date) -> + date.replace /^(\d\d\d\d)-(\d\d)-(\d\d)$/, (match, $1, $2, $3) -> + "#{monthNames[$2 - 1]} #{+$3}, #{$1}" + +releaseHeader = (date, version, prevVersion) -> """ +
+ + #{prevVersion and "#{version}" or version} + + +""" + option '-p', '--prefix [DIR]', 'set the installation prefix for `cake install`' task 'install', 'install CoffeeScript into /usr/local (or --prefix)', (options) -> @@ -160,7 +187,7 @@ task 'doc:source', 'rebuild the internal documentation', -> task 'doc:underscore', 'rebuild the Underscore.coffee documentation page', -> - exec 'docco examples/underscore.coffee && cp -rf docs documentation && rm -r docs', (err) -> + exec 'node_modules/.bin/docco examples/underscore.coffee && cp -rf docs documentation && rm -r docs', (err) -> throw err if err task 'bench', 'quick benchmark of compilation time', -> diff --git a/documentation/index.html.js b/documentation/index.html.js index b23ebc3c..105eb36b 100644 --- a/documentation/index.html.js +++ b/documentation/index.html.js @@ -111,7 +111,7 @@

Latest Version: - 1.7.1 + 1.7.1

@@ -158,14 +158,14 @@ npm install -g coffee-script

If you'd prefer to install the latest master version of CoffeeScript, you can clone the CoffeeScript - source repository + source repository from GitHub, or download - the source directly. - To install the lastest master CoffeeScript compiler with npm: + the source directly. + To install the latest master CoffeeScript compiler with npm:

-npm install -g http://github.com/jashkenas/coffee-script/tarball/master
+npm install -g jashkenas/coffeescript

Or, if you want to install to /usr/local, and don't want to use @@ -351,7 +351,7 @@ Expressions Just for kicks, a little bit of the compiler is currently implemented in this fashion: See it as a document, - raw, + raw, and properly highlighted in a text editor.

@@ -1125,7 +1125,7 @@ Expressions