Skip to content
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

Remove jQuery from default dependencies. #8388

Closed
wants to merge 2 commits into from

Conversation

maciej-trebacz
Copy link
Contributor

This pull request removes jQuery package from default project skeletons.
Also removes it from http package because it didn't use it at all.

This commit removes jQuery package from default project skeletons.
Also removes it from http package because it didn't use it at all.
@maciej-trebacz maciej-trebacz mentioned this pull request Feb 17, 2017
@abernix
Copy link
Contributor

abernix commented Feb 17, 2017

Thanks for opening this as a separate issue from the #8327 thread.

I think this is reasonable to consider, but we probably need to take inventory of and consider tutorials (and expectations) that may exist out there right now before merging this.

Could you actually open the http part as a separate PR and remove it from this one so we compartmentalize the changes? That part to me seems like a no-brainer (thanks for finding that!). 😉

@abernix
Copy link
Contributor

abernix commented Feb 17, 2017

Also, can you please enable your CircleCI builds for meteor so we can see if the tests pass? Currently the CircleCI build did not run on this PR since you do not have it enabled but you use CircleCI:

@maciej-trebacz
Copy link
Contributor Author

maciej-trebacz commented Feb 17, 2017

@abernix Done.

As for tutorials and guides, I think we are good, because normally the flow for creating a new project would not change, since blaze-html-templates is still a default dependency. And if someone removes blaze-html-templates from the project (to replace it with React or Vue) then he doesn't need to use jQuery at all, unless he/she wishes to do so, in which case it can be added manually via npm.

@benjamn benjamn added this to the Release 1.5 milestone Feb 18, 2017
Copy link
Contributor

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@abernix abernix changed the base branch from release-1.5 to devel February 23, 2017 10:40
@abernix abernix changed the base branch from devel to release-1.5 February 23, 2017 10:58
@abernix
Copy link
Contributor

abernix commented Feb 23, 2017

Thank you for submitting this. I fully agree with your last statement.

Merged manually to devel with bf1b58e. In the future, please submit PRs from the devel branch to the devel branch.

I've left this PR targeted to release-1.5 to simply the viewing experience (to exclude 1.5 changes) of this PR. 😉

@abernix abernix closed this Feb 23, 2017
@abernix abernix modified the milestones: Release 1.4.3.x, Release 1.5 Mar 9, 2017
@abernix
Copy link
Contributor

abernix commented Mar 9, 2017

This should be done in Meteor 1.4.3.2. You can try the latest 1.4.3.2 beta and help confirm by running:

meteor update --release 1.4.3.2-beta.0

Please report back if you encounter any problems, and thanks for taking care of this!

@abernix abernix modified the milestones: Release 1.4.3.x, Release 1.4.3.2 Mar 9, 2017
@haojia321
Copy link
Contributor

If I add jquery from npm, does that mean I have to explicitly import jquery in every js file(assume I use jquery in every js file)?

@stubailo
Copy link
Contributor

You could do window.$ = require('jquery') but I wouldn't recommend it, importing everywhere is a much better approach.

@abernix
Copy link
Contributor

abernix commented Mar 16, 2017

@haojia321 While I fully agree you should prefer an approach (as @stubailo recommended above) where you import in every file (which you'll likely appreciate later and avoids polluting your global namespace) if you'd like to keep the behavior where jQuery is available everywhere with no additional code you can install jQuery from npm, keep the jquery package in your Meteor project and it will take care of the window.$ = require('jquery') for you, preferring your npm-installed version of jQuery:

$ meteor add jquery
$ meteor npm install jquery --save

@hwillson hwillson mentioned this pull request Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants