ForbesLindesay / browserify-middleware

express middleware for browserify, done right
http://browserify.org
MIT License
381 stars 66 forks source link

Added support for CoffeeScript and LiveScript #12

Closed maxnordlund closed 11 years ago

maxnordlund commented 11 years ago

Instead of whitelisted extensions, aka .js|.ls|.coffee, use a blacklist. This allows the use of other languages then javascript to be served using browserify-middleware.

ForbesLindesay commented 11 years ago

This allows everything except JSON, which, incidentally, browserify supports. I would accept something that added a grep option that replaced the default isJS regexp. Then you could do:

browserify.settings('grep', /\.coffee$|\.js$/)
maxnordlund commented 11 years ago

Indeed this sound much better. Implemented it just now, and the tests are passing.

ForbesLindesay commented 11 years ago

Looks good, I'm on holiday for the week at the moment, but I'll look at this as soon as so get back.

ForbesLindesay commented 11 years ago

Merged manually (with some modification) via https://github.com/ForbesLindesay/browserify-middleware/commit/65631ea9b96891b0036941c4b54e83a8576bf40e