Remove `jquery` from required packages
See original GitHub issueRelates to #22194
jQuery
should be removed from the mandatory dependencies for Bootstrap library.
Since Bootstrap is posioned as CSS framework (not JS one) and it is declared it can function without JQuery (even while it is limiting its features), there should be a way to install pure Bootstrap without JQuery from the repositories like Bower/Npm.
In particular, these lines should be removed: https://github.com/twbs/bootstrap/blob/v4-dev/bower.json#L34-L35
In the modern web application development more and more projects relies on suhc JS libraries like AngularJS, ReactJs, EmberJS and so on, in pursuit for ‘on-page-site’ feature implementation.
If particular developer wishes to use AngularJS and Bootstrap, why should he install a ‘jquery’ package, which will lie as a garbage among the project source files? Keeping ‘jquery’ as mandatory dependency looks unprofessional.
Ideally JS related code should be moved into a separated repository, which will depend on ‘twbs/bootstrap’ and ‘jquery’, while ‘twbs/bootstrap’ itself will be requirement free.
If this be a Composer installation, the quick solution will be move ‘jquery’ into suggest section, but for Bower/Npm - I can not say.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:23
- Comments:24 (15 by maintainers)
I don’t see any issue with switching
jquery
andpopper.js
to bepeerDependencies
instead, as long as we tweak the docs to remind people to include them separately if they want to use our JavaScript.The days of jQuery are passing: the common demand for the modern web application is to be ‘one-page-site’. This is the demand of the business - it is not I who speaks it. jQuery is not suitable for ‘one-page-site’ project creation - this task is resolved by modern JS frameworks like AngularJS, RactJS, EmberJS and so on.
You an of course stay with the old technology as it is a part of your zone of confort - that is fine and natural for the human. However, the time is passing and more and more developers will have to abandon JQuery usage and move to ‘one-page-site’ solutions. It will take another several years to prepare Bootstrap 5.0, do they need to wait until then and struggling with JQuery installation?
At the present state, intalling Bootstrap via Bower, I need to waste time, network resources and disk space to fetch the JS libraries, which I do NOT need. This contradicts the idea of package intallation and package managers like Bower/NPM. If I need additional functionality - I should install additional package.