CoffeeScript support
Closed this issue · 3 comments
punmechanic commented
Hi,
loader.js
only allows for .js
files to be loaded. Consider removing the path extension restriction and removing the extension based on path.extname
:
if (fs.statSync(file).isFile()) {
var filePath = '^' + path.join(path.resolve(root), '/');
var ext = path.extname(file);
filePath = filePath.replace(/\\/g, '\\\\');
paths[file.replace(new RegExp(filePath), '').replace(ext, '').toLowerCase()] = file;
zedgu commented
what's the extname of coffeescript ?
i don't think we should load all format files, except js.
punmechanic commented
@zedgu coffeescript can be in .coffee
, .litcoffee
, .md.coffee
, probably a few others
I think it at the very least makes sense to leave it up to the user of the package to decide what they want to load.
zedgu commented
new option api for extname , checkout v0.2.2