-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Suppose we have a file named "master.coffee".
Right now, the CLI for CoffeeScript allows us to specify a specific folder where we want the compiled Javascript file created:
--output /folder/subfolder/outputHere
This will generate the following file:
/folder/subfolder/outputHere/master.js
But in many cases, we might want the name of the output file to be different than the name of the source file. I would like the --output flag to support this possibility. If the supplied path ends with a file rather than a folder, the Coffee compiler should use that name for the output file. Example:
--output /folder/somefolder/awesome.js
CoffeeScript is the only "cutting edge" tool on the market that doesn't have the capability to specify complete output file paths. I know it may seem like a small thing, but when building CoffeeScript into other apps or tools, it really is a frustrating limitation. It's even more of an issue now that CS supports source maps, so we can't just change the file names on the fly; they're hard-coded into the maps.