Closed doxxx closed 9 years ago
I can confirm this is a issue. The simple fix is to change
"main": ["./ui-bootstrap-tpls.js"],
to:
"main": "./ui-bootstrap-tpls.js",
I don't know if this will have issues with other builders but fixes issues with browserify/browserify-shim/debowerify
As far as I know an array is a perfectly valid value for the main property. Seems like an issue woth debowerify.
https://docs.npmjs.com/files/package.json has following to say on the main field
main
The main field is a module ID that is the primary entry point to your program. That is, if your package is named foo, and a user installs it, and then does require("foo"), then your main module's exports object will be returned.
This should be a module ID relative to the root of your package folder.
For most modules, it makes the most sense to have a main script and often not much else.
Refers to ID
as a relative path.
Sorry to keep posting but i did look it up a few places. https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/package_json says
A string representing the name of a program module that is located in one of the top-level module directories specified by lib. Defaults to "main".
and http://browsenpm.org/package.json uses string as value for main
It's nice that you're comparing all sorts of tools, assuming that they all do the same based on the fact that they have a corresponding filename, package.json.
This is a bower repository which has a bower package.json and following the bower documentation, it's perfectly fine to have an array as a value for main
:
http://bower.io/docs/creating-packages/
main
string or array: The primary acting files necessary to use your package.
If it isn't a npm module, don't distribute it over npm. angular-bootstrap-npm works with browserify etc.
We didn't distribute to npm. Someone else did.
After installing using
npm install angular-ui-bootstrap
, gulp debowerify chokes on the package.json's main value:If I manually change the installed package.json's value from a list to a string, debowerify is happy again.