Commit Graph

7 Commits

Author SHA1 Message Date
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
Geoffrey 4cc701a9da Remove hyphen in `coffee-script` 2017-02-12 17:00:05 -08:00
Michael Ficarra c0dac45fe1 OptionParser and related tests needed a cleanup
The object returned from OptionParser::parse no longer has a `literals`
property. It was pretty arbitrary, anyway.
2012-01-25 19:47:03 -05:00
Michael Ficarra fc0a169a9a fixes #1910: loop index should be mutable within a loop iteration and immutable between loop iterations 2011-12-21 14:06:34 -05:00
gfxmonk ab17f41652 Moved src/*.coffee under src/coffee-script/ so that lib can be added to $NODE_PATH and only expose the top-level coffee-script namespace. Fixes #1246 2011-07-05 21:58:04 +10:00
Michael Ficarra dcfdd144d8 test reorganization waypoint 2010-12-29 00:48:54 -05:00
Michael Ficarra 0fd3ed593c adding new (empty) classifications for tests 2010-12-28 23:33:13 -05:00