gobblejs / gobble-browserify

Bundle CommonJS modules with gobble and Browserify
4 stars 9 forks source link

browserify.ignore #4

Closed timshannon closed 9 years ago

timshannon commented 9 years ago

Is there anyway to pass values into the ignore call? It's not a browserify option, but called directly on the browserify object: https://www.npmjs.com/package/browserify#b-ignore-file

Or should I just call my own browserify function, and use it there?

Rich-Harris commented 9 years ago

It should be possible - I haven't ever really ventured beyond the basics of browserify, but if I understand correctly this should work (haven't tried it, just did it through the GH web interface, so YMMV).

If it does work, I'll merge it in later (don't have time right now sadly).

I guess it should probably support transforms in a similar fashion...

timshannon commented 9 years ago

Yeah, that's what I just put in my custom browserify function, and it works fine.

One small change before you commit yours though; you should call b.ignore( options.ignore ); not browserify.ignore( options.ignore );

Other than that, it'll work perfect for me.

Thanks

Rich-Harris commented 9 years ago

@timshannon I've just released 0.4.0, which adds support for ignore and exclude along with expose (I was searching for ages to try and figure out how to insist that browserify use ./this/particular/foo.js for require('foo') - expose is a shorthand for doing that).

It also adds a generic configure hook for ad hoc configuration. Details on the README