Permalink
Browse files

moved the coffeescript extension over from .cs to .coffee -- let's le…

…ave C# in peace. Changed array comprehensions to always return their mapped result, even when unassigned
  • Loading branch information...
jashkenas committed Dec 25, 2009
1 parent e494d52 commit d46bf8ee71fabc8d72b47df73a7fe278e10e26ca
Showing with 128 additions and 148 deletions.
  1. +1 −1 README
  2. +2 −2 Rakefile
  3. 0 documentation/{cs/aliases.cs → coffee/aliases.coffee}
  4. 0 documentation/{cs/array_comprehensions.cs → coffee/array_comprehensions.coffee}
  5. 0 documentation/{cs/assignment.cs → coffee/assignment.coffee}
  6. 0 documentation/{cs/conditionals.cs → coffee/conditionals.coffee}
  7. 0 documentation/{cs/embedded.cs → coffee/embedded.coffee}
  8. 0 documentation/{cs/expressions.cs → coffee/expressions.coffee}
  9. 0 documentation/{cs/functions.cs → coffee/functions.coffee}
  10. 0 documentation/{cs/objects_and_arrays.cs → coffee/objects_and_arrays.coffee}
  11. 0 documentation/{cs/overview.cs → coffee/overview.coffee}
  12. 0 documentation/{cs/scope.cs → coffee/scope.coffee}
  13. 0 documentation/{cs/slices.cs → coffee/slices.coffee}
  14. 0 documentation/{cs/strings.cs → coffee/strings.coffee}
  15. 0 documentation/{cs/super.cs → coffee/super.coffee}
  16. 0 documentation/{cs/switch.cs → coffee/switch.coffee}
  17. 0 documentation/{cs/try.cs → coffee/try.coffee}
  18. 0 documentation/{cs/while.cs → coffee/while.coffee}
  19. +0 −3 documentation/cs/intro.cs
  20. +0 −11 documentation/cs/punctuation.cs
  21. +13 −13 documentation/index.html.erb
  22. 0 examples/{code.cs → code.coffee}
  23. 0 examples/{documents.cs → documents.coffee}
  24. 0 examples/{poignant.cs → poignant.coffee}
  25. 0 examples/{syntax_errors.cs → syntax_errors.coffee}
  26. 0 examples/{underscore.cs → underscore.coffee}
  27. +12 −12 index.html
  28. +1 −1 lib/coffee_script/CoffeeScript.tmbundle/Preferences/CoffeeScript.tmPreferences
  29. +45 −46 lib/coffee_script/CoffeeScript.tmbundle/Syntaxes/CoffeeScript.tmLanguage
  30. +1 −1 lib/coffee_script/command_line.rb
  31. +1 −1 lib/coffee_script/narwhal/{coffee-script.cs → coffee-script.coffee}
  32. +1 −1 lib/coffee_script/narwhal/js/coffee-script.js
  33. +2 −2 lib/coffee_script/narwhal/js/loader.js
  34. 0 lib/coffee_script/narwhal/{launcher.cs → launcher.coffee}
  35. +2 −2 lib/coffee_script/narwhal/{loader.cs → loader.coffee}
  36. +22 −25 lib/coffee_script/nodes.rb
  37. 0 test/fixtures/{each.cs → each.coffee}
  38. +9 −5 test/fixtures/each.js
  39. +9 −5 test/fixtures/each_no_wrap.js
  40. 0 test/fixtures/execution/{array_comprehension.cs → array_comprehension.coffee}
  41. 0 test/fixtures/execution/{assign_to_try_catch.cs → assign_to_try_catch.coffee}
  42. 0 test/fixtures/execution/{calling_super.cs → calling_super.coffee}
  43. 0 test/fixtures/execution/{chained_calls.cs → chained_calls.coffee}
  44. 0 test/fixtures/execution/{fancy_if_statement.cs → fancy_if_statement.coffee}
  45. +0 −10 test/fixtures/execution/keyword_operators.cs
  46. 0 test/fixtures/execution/{test_everything.cs → test_everything.coffee}
  47. 0 test/fixtures/execution/{test_switch.cs → test_switch.coffee}
  48. 0 test/fixtures/{inner_comments.cs → inner_comments.coffee}
  49. +3 −3 test/unit/test_execution.rb
  50. +1 −1 test/unit/test_lexer.rb
  51. +3 −3 test/unit/test_parser.rb
View
2 README
@@ -26,7 +26,7 @@
gem install coffee-script
Compile a script:
- coffee-script /path/to/script.cs
+ coffee-script /path/to/script.coffee
For documentation, usage, and examples, see:
http://jashkenas.github.com/coffee-script/
View
@@ -19,15 +19,15 @@ namespace :build do
desc "Compile the Narwhal interface for --interactive and --run"
task :narwhal do
- sh "bin/coffee-script lib/coffee_script/narwhal/*.cs -o lib/coffee_script/narwhal/js"
+ sh "bin/coffee-script lib/coffee_script/narwhal/*.coffee -o lib/coffee_script/narwhal/js"
end
end
desc "Build the documentation page"
task :doc do
source = 'documentation/index.html.erb'
- child = fork { exec "bin/coffee-script documentation/cs/*.cs -o documentation/js -w" }
+ child = fork { exec "bin/coffee-script documentation/coffee/*.coffee -o documentation/js -w" }
at_exit { Process.kill("INT", child) }
Signal.trap("INT") { exit }
loop do
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +0,0 @@
-# CoffeeScript on the left, JS on the right.
-
-square: x => x * x.
@@ -1,11 +0,0 @@
-# Comments start with hash marks.
-
-# Periods mark the end of a block.
-left_hand: if raining then umbrella else parasol.
-
-# To signal the beginning of the next expression,
-# use "then", or a newline.
-left_hand: if raining
- umbrella
-else
- parasol.
@@ -3,7 +3,7 @@
def code_for(file, executable=false)
@stripper ||= /(\A\(function\(\)\{\n|\}\)\(\);\Z|^ )/
return '' unless File.exists?("documentation/js/#{file}.js")
- cs = File.read("documentation/cs/#{file}.cs")
+ cs = File.read("documentation/coffee/#{file}.coffee")
js = File.read("documentation/js/#{file}.js").gsub(@stripper, '')
cshtml = Uv.parse(cs, 'xhtml', 'coffeescript', false, 'idle', false)
jshtml = Uv.parse(js, 'xhtml', 'javascript', false, 'idle', false)
@@ -92,11 +92,11 @@ gem install coffee-script</pre>
<p>
Installing the gem provides the <tt>coffee-script</tt> command, which can
- be used to compile CoffeeScript <tt>.cs</tt> files into JavaScript, as
- well as debug them. In conjunction with
+ be used to compile CoffeeScript <tt>.coffee</tt> files into JavaScript, as
+ well as debug them. In conjunction with
<a href="http://narwhaljs.org/">Narwhal</a>, the <tt>coffee-script</tt>
- command also provides direct evaluation and an interactive REPL.
- When compiling to JavaScript, <tt>coffee-script</tt> writes the output
+ command also provides direct evaluation and an interactive REPL.
+ When compiling to JavaScript, <tt>coffee-script</tt> writes the output
as <tt>.js</tt> files in the same directory by default, but output
can be customized with the following options:
</p>
@@ -105,7 +105,7 @@ gem install coffee-script</pre>
<tr>
<td width="25%"><code>-i, --interactive</code></td>
<td>
- Launch an interactive CoffeeScript session.
+ Launch an interactive CoffeeScript session.
Requires <a href="http://narwhaljs.org/">Narwhal</a>.
</td>
</tr>
@@ -187,9 +187,9 @@ gem install coffee-script</pre>
</p>
<pre>
-coffee-script path/to/script.cs
-coffee-script --watch --lint experimental.cs
-coffee-script --print app/scripts/*.cs > concatenation.js</pre>
+coffee-script path/to/script.coffee
+coffee-script --watch --lint experimental.coffee
+coffee-script --print app/scripts/*.coffee > concatenation.js</pre>
<h2>Language Reference</h2>
@@ -442,18 +442,18 @@ coffee-script --print app/scripts/*.cs > concatenation.js</pre>
</ul>
<h2 id="change_log">Change Log</h2>
-
+
<p>
<b class="header" style="margin-top: 20px;">0.1.3</b>
- The <tt>coffee-script</tt> command now includes <tt>--interactive</tt>,
+ The <tt>coffee-script</tt> command now includes <tt>--interactive</tt>,
which launches an interactive CoffeeScript session, and <tt>--run</tt>,
which directly compiles and executes a script. Both options depend on a
working installation of Narwhal.
- The <tt>aint</tt> keyword has been replaced by <tt>isnt</tt>, which goes
+ The <tt>aint</tt> keyword has been replaced by <tt>isnt</tt>, which goes
together a little smoother with <tt>is</tt>.
Quoted strings are now allowed as identifiers within object literals: eg.
<tt>{"5+5": 10}</tt>.
- All assignment operators now use a colon: <tt>+:</tt>, <tt>-:</tt>,
+ All assignment operators now use a colon: <tt>+:</tt>, <tt>-:</tt>,
<tt>*:</tt>, etc.
</p>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -162,11 +162,11 @@ <h2 id="installation">Installation and Usage</h2>
<p>
Installing the gem provides the <tt>coffee-script</tt> command, which can
- be used to compile CoffeeScript <tt>.cs</tt> files into JavaScript, as
- well as debug them. In conjunction with
+ be used to compile CoffeeScript <tt>.coffee</tt> files into JavaScript, as
+ well as debug them. In conjunction with
<a href="http://narwhaljs.org/">Narwhal</a>, the <tt>coffee-script</tt>
- command also provides direct evaluation and an interactive REPL.
- When compiling to JavaScript, <tt>coffee-script</tt> writes the output
+ command also provides direct evaluation and an interactive REPL.
+ When compiling to JavaScript, <tt>coffee-script</tt> writes the output
as <tt>.js</tt> files in the same directory by default, but output
can be customized with the following options:
</p>
@@ -175,7 +175,7 @@ <h2 id="installation">Installation and Usage</h2>
<tr>
<td width="25%"><code>-i, --interactive</code></td>
<td>
- Launch an interactive CoffeeScript session.
+ Launch an interactive CoffeeScript session.
Requires <a href="http://narwhaljs.org/">Narwhal</a>.
</td>
</tr>
@@ -257,9 +257,9 @@ <h2 id="installation">Installation and Usage</h2>
</p>
<pre>
-coffee-script path/to/script.cs
-coffee-script --watch --lint experimental.cs
-coffee-script --print app/scripts/*.cs > concatenation.js</pre>
+coffee-script path/to/script.coffee
+coffee-script --watch --lint experimental.coffee
+coffee-script --print app/scripts/*.coffee > concatenation.js</pre>
<h2>Language Reference</h2>
@@ -829,18 +829,18 @@ <h2 id="contributing">Contributing</h2>
</ul>
<h2 id="change_log">Change Log</h2>
-
+
<p>
<b class="header" style="margin-top: 20px;">0.1.3</b>
- The <tt>coffee-script</tt> command now includes <tt>--interactive</tt>,
+ The <tt>coffee-script</tt> command now includes <tt>--interactive</tt>,
which launches an interactive CoffeeScript session, and <tt>--run</tt>,
which directly compiles and executes a script. Both options depend on a
working installation of Narwhal.
- The <tt>aint</tt> keyword has been replaced by <tt>isnt</tt>, which goes
+ The <tt>aint</tt> keyword has been replaced by <tt>isnt</tt>, which goes
together a little smoother with <tt>is</tt>.
Quoted strings are now allowed as identifiers within object literals: eg.
<tt>{"5+5": 10}</tt>.
- All assignment operators now use a colon: <tt>+:</tt>, <tt>-:</tt>,
+ All assignment operators now use a colon: <tt>+:</tt>, <tt>-:</tt>,
<tt>*:</tt>, etc.
</p>
@@ -5,7 +5,7 @@
<key>name</key>
<string>comments</string>
<key>scope</key>
- <string>source.cs</string>
+ <string>source.coffee</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
Oops, something went wrong.

0 comments on commit d46bf8e

Please sign in to comment.