calvinmetcalf / derequire

remove require statements without breaking scope
MIT License
65 stars 17 forks source link

Document plugin? #34

Open jmm opened 8 years ago

jmm commented 8 years ago

Can the plugin be documented?

calvinmetcalf commented 8 years ago

We can, the plugin is tricky though because it doesn't do what you expect it to do, it only affects preexisting requires and doesn't affect any that browserify might add, it was added for a specific use case

jmm commented 8 years ago

Hmm, are you sure? That's not what I'm seeing, and looking at the code I can see it's tacked on at the very end of the pipeline, so should run over the entire bundled output. What was the use case it was added for?

calvinmetcalf commented 8 years ago

hm I might be wrong about that @zertosh what was the reasoning behind the plugin ?

zertosh commented 8 years ago

I added it so it could be used with the browserify CLI via the plugins flag - instead of piping. This is useful if you're using watchify.