-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve default behavior #10
Comments
So the reason for this API being as it is right now is to cater to transforms specified from either the CLI or within a module.exports = function(file, opts) {
return new Stream
} So in the above example you'd actually have the following, where var envify = require('envify')
browserify().transform(envify) The only way to get the behaviour you're after is to check the first argument for an Object vs. String, which could be a bit quirky but might work! Would definitely want this to be a major version bump though. If you wanna give it a shot send a PR and we'll see :) |
I ran into #7 again today, which made me wonder if we might improve the default behavior or
envify
.Instead of having to choose between
require('envify')
andrequire('envify/custom')
this behavior might be more intuitive.Let me know what you think, if you approve I'll PR the changes.
The text was updated successfully, but these errors were encountered: