thlorenz / browserify-shim

📩 Makes CommonJS incompatible files browserifyable.
MIT License
933 stars 87 forks source link

Use browserify-shim in a build script (i.e. with Browserify's JS API)? #173

Closed cperryk closed 9 years ago

cperryk commented 9 years ago

Is there a way to use browserify-shim with Browserify's JS API? Like:

var browserify = require('browserify');
var b = browserify();
b.transform('browserify-shim', {'jquery':'$'})
b.bundle(writeBundle)
// ...etc.

When I run something like this, I get the error message: Unable to find a browserify-shim config section in the package.json It doesn't make much sense to me to put the config in package.json unless you are using browserify via the command line.

bendrucker commented 9 years ago

There is not right now. See #146 among others.