maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
726 stars 58 forks source link

Compiler: "Fallback to vanilla" switch (option) #104

Closed am11 closed 6 years ago

am11 commented 10 years ago

Consider the following command to compile .coffee from CLI:

node "node_modules\iced-coffee-script\bin\coffee" --bare 
--runtime inline --output "C:\Users\Adeel\AppData\Local\Temp" 
--compile "C:\Users\Adeel\AppData\Local\Temp\5efb2e712281.coffee"

Now, if the source (.coffee) file has the call to defer(), the resultant JS would have __iced_deferrals context implemented.

Is there a way to turn it off? I am struggling to figure out whether or not I need both CS and ICS compiler modules, to satisfy this request: https://github.com/madskristensen/WebEssentials2013/issues/320. OR would ICS suffice?

Proposed Solution: Two birds with one stone

If its not possible already, please introduce an optional switch / argument to make the IcedCoffeeScript compiler act like vanilla coffee compiler and compile extra stuff, which otherwise coffeescript compiler wouldn't do natively:

output of IcedCoffeeScript compiler (with vanilla option enabled) == output of CoffeeScript compiler

Momentarily, while two file extensions are discussed in the documentation; .iced and .coffee, wouldn't it make sense to compile the files with settings based on the extension? By default .coffee should give the same output as native CoffeeScript compiler and .iced (or any other unknown extension) to result in the rhetorical iced output with context: __iced_deferrals and other gems. :-)