-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
(dev/drupal#8) Migrate bower.json into composer.json via composer-downloads-plugin #15044
(dev/drupal#8) Migrate bower.json into composer.json via composer-downloads-plugin #15044
Conversation
(Standard links)
|
I've pushed an update which imports a bunch of the Additionally, to improve readability, I consolidated all the |
@totten I have rebased the latest upstream commits with my select2 repo and tagged it |
Cheers @colemanw. I've pushed an update to use the new tag. |
7f59212
to
6ba8f3d
Compare
This will be replaced in an adjacent commit with updates to composer.json
Before ------ * JS and CSS libraries and downloaded via `bower`. * `bower` is deprecated. * `bower` is slow. * `bower` requires installing NodeJS * `bower` requries installing Bower After ----- * `composer install` downloads the `bower_components` folder * `composer` has a better cache * `composer` is fast * You can setup a dev build with fewer dependencies. Comments -------- There are many, many composer plugins which can be referenced when managing assets. This particular one has an important distinction: * It does not require root-level package configuration. * It produces a file-structure that closely matches the current one. * It works just as well as whether 'civicrm-core' is used as a root-package or as an dependency.
6ba8f3d
to
79e677d
Compare
This is a follow-up to civicrm#15044 - since we don't have/need `bower.json`, it doesn't make sense for `distmaker` to call `bower install`.
This is a follow-up to civicrm#15044 - since we don't have/need `bower.json`, it doesn't make sense for `distmaker` to call `bower install`.
Before
bower
.bower
is deprecated.bower
is slow.bower
requires installing NodeJS.bower
requires installing Bower.After
composer install
downloads thebower_components
folder.composer
has a better cache.composer
is fast.bower_components
will land in the same canonical location, regardless of project structure and environment.Comments
This commit is flagged work-in-progress because it depends on an unreleased branch of a composer plugin. I just want to push it up for the moment so some people can see it. I've opened an issue LastCallMedia/ComposerExtraFiles#2 to discuss the path to publication.This depends on civicrm/composer-downloads-plugin, which is an updated variant of lastcall/composer-extra-files. It has a few key characteristics:
Technical Details
To try this out, I renamed my old
bower_components
, rancomposer
, and compared the new/old trees. The substance all looks good -- there are no missing or differing files.However, there is some new detritus.(Edit: This has been resolved by adding support forignore
directives. The subsequent discussion has been revised to match.)These appear to be trivial differences:
checklist-model/test
, the old tree simply has an empty folder. There's no real content in either old or new tree.bower.json
files, the new tree is more consistent with theignore
specification. The difference arises because (in the old tree)bower
doesn't let you ignorebower.json
. But we don't really need the file at runtime.See also: https://lab.civicrm.org/dev/drupal/issues/8