-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bower to npm in 2.1 #221
Comments
Agree. |
Yes, we should do that, this will make the transition to a new asset installation system also much easier. Related: |
Here's a proposal how it could be done in 2.1: #212 It would be nice if the above PR could be merged into |
Bootstrap 4 can be installed via composer too. It's suitable? |
Probably yes. |
I think we should stick to one repository for frontend packages to avoid duplicated and incompatible dependencies. TB may be available at packagist, but many widgets that depends on bootstrap does not support installation via composer. If we install bootstrap by composer and package X (which depends on bootstrap) by npm, we will get two different bootstrap packages. |
What's the merge/split policy for Can we remove the dependencies here in the In 2.1 there should only be a PS: Bootstrap also requires |
I'd say:
|
The versions are starting to confuse me :) The question is, if there really should be a Moreover - and this applies also to other extensions - a So a version of this repo which uses a very different asset management and BS4 should rather be a |
3.0 sounds OK to me. |
I thought that |
Agree 3.0 for bootstrap 4 |
3.0 release contradicts with existing versioning policy: https://github.com/yiisoft/yii2/blob/master/docs/internals/versions.md |
That's framework version policy. |
All official extensions seems to follow it. It will be really confusing, if we make exception only for one extension. |
What do you propose instead? |
Release it as 2.1. |
Bower support has been dropped for v4, btw: twbs/bootstrap#24590, twbs/bootstrap#23568 |
I took a deeper look on the asset installation procedure with As outlined in https://github.com/yiisoft/yii2/issues/14862 The same issue pops also up in this combination:
The unsolvable dependency is Wan't it even worse? Checkout https://www.npmjs.com/package/lodash - over 63.000 dependents, like 10% of the ecosystem. And nobody will care about this problem, since it isn't one when using Moreover, with That's not all, when installing TL;drWe should not transistion to We should remove all This will break some things in the first place, like mentioned from @klimov-paul in https://github.com/yiisoft/yii2/issues/14862#issuecomment-369224200 - but IMHO it is better to break things now and require It's doomed to failure, if it stays like it is. |
Makes sense. Seems we have to do it :( |
@schmunk42 What will change by developer point of view using directly npm instead npm-asset? |
You'll need to install |
@schmunk42 It is ok. This is an irrilevant con if compared to pros. |
It would be great to use Just one more command.
|
@alexantr Have a look https://github.com/fxpio/foxy - it would (optinally) automate this process |
@schmunk42 It seems nice
|
the PHP based stack is not meant to provide the full functionality that npm has. It is meant to be used for simple setups, e.g. if you fetch bootstrap, jquery and 1-2 other libs for a simple site or application. Given the mess that |
I agree to this statement, but on the other hand we also need to show the "correct" way to the developer. What you've said is feasible for jQuery & Bootstrap, because there are core But for anything else you run into problems, take https://github.com/Insolita/yii2-adminlte-widgets for example - they require AdminLTE, but there's no official core asset-bundle for it, so you can't depend on anything (and if you would, some people might want to exchange the PHP asset-bundle). It also makes no sense to provide your own, because in this case there is ie. our widely used extension. A dependency would only make sense on a CSS/JS level. While I don't support a CDN by default, how about the following (would it be possible?):
Could we reconfigure |
Using CDN by default is a no go. |
Sure, the question is, if a developer could install an application template - and then manually set the mentioned alias, like moving from local filesystem to CDN, just by changing the "include path". An additional alternative would be an auto-built composer package, with the required JS/CSS files. |
Isn't it what we have now with asset-packagist? It's auto-built composer package. |
For simple setups it looks feasible with AP, but the state of npm-package-dependencies seems much worse than bower: peer dependency (see also hiqdev/asset-packagist#77)
"jam" dependency - whatever that is :)no dependencydependency
looks like most have a correct dependency has a dependency, but not in a release |
Need a composer repository like asset-packagist but only with npm dist builds and normalized dependencies 😉 |
@alexantr Related? hiqdev/asset-packagist#67 A problem with npm is that you can't rely on getting dist files for several commits. |
Just want to use npm simply like bower. |
Yeah 😺 I would love to do that also. Now that bower is gone, I miss it. Bower was actually ideal for the way assets were handled in Yii2. But it is like it is, we'll have to live with npm and its issues. |
Since bower got deprecated status will be good idea to replace bower packages (bootstrap and popper.js) with npm packages.
The text was updated successfully, but these errors were encountered: