jashkenas/coffeescript

Proposal: Alternative file extension

vzakharov opened this issue · 1 comments

Okay, I know this must be a hell of a change to make, but having “.coffee” all over my directory structure looks kind of overwhelming. I wonder if it would be possible to introduce an alternative file extension for CoffeeScript, like “.csc” or “cof” or something?

(I would even go with “.☕” just for the lulz.)

You could achieve this via a build tool. If you look at the source for something like gulp-coffee or the Webpack one, they register the extension with the tool and have the tool do the loading of file sources, and then the coffeescript library is asked to transform the sources. So you could fork one of those build tool plugins (or maybe even configure it, if it allows you to define the input sources/extensions) and that should get what you’re looking for.