Closed joshikeerti closed 8 years ago
It may be really hard to resolve dependencies across npm
and bower
packages (which, may need to happen).
But it would be pretty powerful if we could pull it off! I see a trend as package creators start planning for ES6 modules, they seem to shy away from bower
, as the path from ES6 modules to commonJS is a lot cleaner, and that plays very well in the npm
ecosystem.
Let's start thinking about this more! :)
Would still need to think about things likes html/css/font/image handling but yes!
I want to add to my comment from March: it looks like Bower has been taking some steps to better plan for ES6 modules. And again, make sure it's clear that I don't think Bower is going anywhere any time soon!
:+1: Why use bower when npm can do the same things? It wouldn't hurt to support both. I've been able to do some hackey things to get it to work, but would prefer it native.
:+1: appreciate to
I think it would be good to use bundledDependencies
:
Array of package names that will be bundled when publishing the package.
I've been spending some more time thinking about this, and I think the biggest challenge we are going to have is with dependency conflicts. Our solution will likely have to be the same as Bower: having a prompt in the CLI help select between versions, and then persisting those preferences in package.json
.
The specific scenario requiring that would be:
$ npm install --save aye bee
|_ node_modules/aye/node_modules/bee[@1.0]/index.js
|_ node_modules/aye/index.js
|
|_ node_modules/bee[@2.0]/index.js
<!-- bower:js -->
<script src="node_modules/aye/node_modules/bee[@1.0]/index.js"></script>
<script src="node_modules/aye/index.js"></script>
<script src="node_modules/bee[@2.0]/index.js"></script>
<!-- endbower -->
Since this is browser-land, we'd have to force the user to choose between bee@1 or bee@2. They might be able to get away with that, but it could also break the app.
My questions are:
@stephenplusplus I found gulp-npm-files
package and already started some issues to get similar behavior to wiredep
: “Select target array of dependencies” and “Documentation?” with general discussion on it.
If a user is running an npm without default deduping, when they run wiredep, should we do this for them?
Just force the user to use npm@3. Example message: https://github.com/yeoman/doctor/blob/master/lib/messages/npm-version.twig
@Sparticuz do you have any progress on this?
related to #234
Closing in favor of #234
If I am using some packages from bower and some others from npm. Is it still possible to use wiredep in that case? I don't see any examples of pulling from npm dependencies.