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 packages with BowerRepository #3078
Conversation
bower package seem to use this modifier
…ire a real package object this especially improves performance for packages with many tags, eg jquery
interesting... I started today with another approach to this: https://github.com/cebe/composer-bower |
Take bower or any frontend package manager and manage js dependencies. No need pervert composer ideas please. It php package manager. It not package manager for everything. |
@creocoder how does your statement here compares to that one? yiisoft/yii2#3209 (comment) :) Why did you changed your mind? |
@cebe also an interesting approach that would solve the problem. Especially the part that you don't need any changes to composer itself it nice. Imho my approach also has advantages:
|
@nsams how do you cover the conversion of bower version constraints into a format that composer can understand as described here: cebe/composer-bower#2 ? |
@cebe not at all so far. It's an prototype I want to get early feedback for... |
@creocoder in practice many composer packages exist of php + frontend code AND has dependencies on other frontend packages. How to solve that? Another important feature is missing in bower: composer.lock |
Because this is best practice of web dev.
Can you show any famous js library with composer.json inside instead of bootstrap? Last time we try to make PR for js library it was rejected with comment like: "Go to hell with composer.json in this js repo, use bower". After some though i realize that this is only way to do things right. |
@creocoder how do you suggest solving the existing problem then? You currently can not define dependency of composer php project on js library cleanly although the dependency exists. Note that the solution does not require the JS repos to contain a composer.json, all info is read from existing bower.json. |
I can understand why they don't want a package definition for every package manager on earth in their repo. They even would have to maintain it themselves. But that's the whole point of my pull request and cebe/composer-bower: both work with the existing bower.json and make it usable for composer. |
I see NO ANY problems really. Just write in your extension README what version of frontend package is required and user will get this version using any frontend package manager, using any way he like. Someone will use bower, someone will use component, someone will use package manager which will be developed in future. MOST important that this will be frontend package manager which can be used with any backend language. There is all clean in web dev. We have backend package managers (individual per language used) and frontend package managers. If you plan write into your composer.json any depencies of frontend packages this backend package will not be used, because you insist on your way of getting frontend package and this is BIG mistake. Because this is just out of normal web dev workflow. Such backend packages will be "very smart" white crows and i belive no one will use that. |
Imagine I create a CMS and use composer for php dependencies. You suggest, that I require all my potential users (who never programmed anything, have no idea about javascript, package managers, etc.) to search the web and download dependencies by hand (or using a package manager they never heard of), before they can use my CMS? 😏 |
I think it is better to go through the plugin system and not included the system directly in Composer. It is for this reason that I created a plugin for accessing to files Currently the plugin only works in global mode, but there is a PR #3082 waiting, for restart the installation after installing plugins, and in this case, the plugin can be added directly to the project dependencies. |
Ofcourse not. You need use bower or anyother frontend package manager for manage frontend packages. You need use composer or any php package manager for manage backend packages. You run it before distribute your CMS, also you run composer ofcource and distribute CMS with all files included. I do not even understand what trouble you talking about? bower and comoser tools for developers, not users. No need say that composer known by everybody. Compare composer and bower popularity and i think you'll understand something new. |
Well, I'd like to use composer though 😏 However, I won't discuss this further, I just hope there will be bower support in composer at some point 🍃 |
@francoispluchino Yeah, I will tinker around with it. |
@francoispluchino wow, amazing! With that I think we can close my PR 😄 |
closing this PR in favor of https://github.com/francoispluchino/composer-asset-plugin |
Another alternative for installing asset packages: http://www.nikosams.net/blog/17_composer_npm_bower_assets_installation_using_composer-extra-assets |
I think that a js and css packages are the same big part of php ecosystem as php packages are. So the next logical evolutional step is a package manager that can combine many package repositories (composer, bower, npm or even linux repositories) together. imho |
@francoispluchino already working with it ;) |
(copy of post to composer-dev mailing list to reach larger audience)
I want to manage javascript dependencies for my projects.
As far as I can see possible options are:
Related Discussion: #1121
I implemented a first prototype for (3) where I created a BowerRepository similar
to PearRepository that allows installing bower packages. (This is still work in progress and has many rough edges - I just want to get early feedback)
Example usage:
Now my question is if this is a good idea that you are willing to integrate into composer.
Or any other thoughts you might have about this...