Unfancy JavaScript
Go to file
Danny McClanahan 4e57ca6833 [CS2] Add #! support for executable scripts on Linux. (#3946)
* Add #! support for executable scripts on Linux.

Pass arguments to executable script unchanged if using "#!/usr/bin/env
coffee". (Previously, "./test.coffee -abck" would be turned into "-a -b -c -k",
for example.)

Fixes #1752.

* refactor option parsing

clean up parsing code and in the process fix oustanding bug where coffeescript
modified arguments meant for an executable script

* address comments

* intermediate save

* add note saying where OptionParser is used in coffee command

* add some more work

* fix flatten functions

* refactor tests

* make argument processing less confusing

* add basic test

* remove unused file

* compilation now hangs

* remove unnecessary changes

* add tests!!!

* add/fix some tests

* clarify a test

* fix helpers

* fix opt parsing

* fix infinite loop

* make rule building easier to read

* add tests for flag overlap

* revamp argument parsing again and add more thorough testing

* add tests, comment, clean unused method

* address review comments

* add test for direct invocation of shebang scripts

* move shebang parsing test to separate file and check for browser

* remove TODO

* example backwards compatible warnings

* add correct tests for warning 1

* add tests for warnings

* commit output js libs and update docs

* respond to review comments

also add tests for help text

* respond to review comments

* fix example output

* Rewrite argument parsing documentation to be more concise; add it to sidebar and body; add new output

* Don’t mention deprecated syntax; clean up variable names
2017-07-19 16:25:06 -07:00
bin 1.12.6 (#4548) 2017-05-14 11:12:50 -07:00
docs [CS2] Add #! support for executable scripts on Linux. (#3946) 2017-07-19 16:25:06 -07:00
documentation [CS2] Add #! support for executable scripts on Linux. (#3946) 2017-07-19 16:25:06 -07:00
lib/coffeescript [CS2] Add #! support for executable scripts on Linux. (#3946) 2017-07-19 16:25:06 -07:00
src [CS2] Add #! support for executable scripts on Linux. (#3946) 2017-07-19 16:25:06 -07:00
test [CS2] Add #! support for executable scripts on Linux. (#3946) 2017-07-19 16:25:06 -07:00
.gitignore [CS2] Destructuring object spreads (#4493) 2017-06-29 22:57:42 -07:00
.nojekyll Move v1 documentation under `docs/v1`, with `docs/index.html` symlinking to `docs/v1/index.html` (with `.nojekyll` file to hopefully make the symlink work) 2016-11-15 20:54:30 -08:00
CONTRIBUTING.md 2.0.0-beta3 (#4594) 2017-06-30 09:58:05 -07:00
Cakefile [CS2] Support for CSX - equivalent of JSX (#4551) 2017-06-06 23:33:46 -07:00
LICENSE Update copyright range to 2017 2017-01-04 00:34:28 -08:00
README.md 1.12.6 (#4548) 2017-05-14 11:12:50 -07:00
bower.json [CS2] Module should be require-able in non-Node environments like Webpack and Browserify (#4546) 2017-05-13 21:20:36 -07:00
package.json 1.12.7 docs 2017-07-17 00:25:02 -07:00
register.js Remove hyphen in `coffee-script` 2017-02-12 17:00:05 -08:00
repl.js Remove hyphen in `coffee-script` 2017-02-12 17:00:05 -08:00

README.md

        {
     }   }   {
    {   {  }  }
     }   }{  {
    {  }{  }  }                    _____       __  __
   { }{ }{  { }                   / ____|     / _|/ _|
 .- { { }  { }} -.               | |     ___ | |_| |_ ___  ___
(  { } { } { } }  )              | |    / _ \|  _|  _/ _ \/ _ \
|`-..________ ..-'|              | |___| (_) | | | ||  __/  __/
|                 |               \_____\___/|_| |_| \___|\___|
|                 ;--.
|                (__  \            _____           _       _
|                 | )  )          / ____|         (_)     | |
|                 |/  /          | (___   ___ _ __ _ _ __ | |_
|                 (  /            \___ \ / __| '__| | '_ \| __|
|                 |/              ____) | (__| |  | | |_) | |_
|                 |              |_____/ \___|_|  |_| .__/ \__|
 `-.._________..-'                                  | |
                                                    |_|

CoffeeScript is a little language that compiles into JavaScript.

Installation

Once you have Node.js installed:

npm install --global coffeescript

Leave off the --global if you dont wish to install globally.

Getting Started

Execute a script:

coffee /path/to/script.coffee

Compile a script:

coffee -c /path/to/script.coffee

For documentation, usage, and examples, see: http://coffeescript.org/

To suggest a feature or report a bug: https://github.com/jashkenas/coffeescript/issues

If youd like to chat, drop by #coffeescript on Freenode IRC.

The source repository: https://github.com/jashkenas/coffeescript.git

Changelog: http://coffeescript.org/#changelog

Our lovely and talented contributors are listed here: https://github.com/jashkenas/coffeescript/contributors