ForbesLindesay / browserify-middleware

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

Support any env (not just `development` and `production`) #3

Closed mhart closed 11 years ago

mhart commented 11 years ago

If you use any NODE_ENV besides development or production (eg test), then browserify-middleware crashes with a nasty message: Object.keys called on non-object from here:

https://github.com/ForbesLindesay/browserify-middleware/blob/master/lib/settings.js#L52

I think there should just be default settings, and then these can be overridden by env-specific settings if need be.

A workaround for now is:

if (process.env.NODE_ENV !== 'production')
  browserify.settings('mode', 'development')
ForbesLindesay commented 11 years ago

Released as 1.7.0

mhart commented 11 years ago

Awesome - thanks! :+1: :+1: :+1:

ForbesLindesay commented 11 years ago

:smile: