question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove `jquery` from required packages

See original GitHub issue

Relates 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:closed
  • Created 6 years ago
  • Reactions:23
  • Comments:24 (15 by maintainers)

github_iconTop GitHub Comments

7reactions
bardiharborowcommented, Aug 5, 2017

I don’t see any issue with switching jquery and popper.js to be peerDependencies instead, as long as we tweak the docs to remind people to include them separately if they want to use our JavaScript.

5reactions
klimov-paulcommented, Aug 8, 2017

I don’t see how having a dependency looks unprofessional. You don’t need jQuery; that we do isn’t not unprofessional. It’s simply irrelevant to you.

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.remove() | jQuery API Documentation
A selector expression that filters the set of matched elements to be removed. Similar to .empty() , the .remove() method takes elements out...
Read more >
meteor - How do I remove jquery
To remove/replace jQuery with another version (2.x or 3.x). Clone jquery package from official sources into your project folder /packages .
Read more >
Remove jquery and bootstrap package.json
I need to remove jquery, bootstrap and popper from my dependencies, I will only use vuejs. But when I remove the package.json and...
Read more >
Removing jQuery from GitHub.com frontend
In this post, we will explain a bit of history of how we started depending on jQuery in the first place, how we...
Read more >
How We Removed jQuery from a large app
How we went about removing jQuery from a large application that had ... We needed organizational buy-in, and got it when our product...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found