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
base: release-1.5
from

Conversation

Projects
None yet
5 participants
@M4v3R
Contributor

M4v3R commented Feb 17, 2017

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

Remove jQuery from default dependencies.
This commit removes jQuery package from default project skeletons.
Also removes it from http package because it didn't use it at all.

@M4v3R M4v3R referenced this pull request Feb 17, 2017

Merged

Release 1.5 #8327

@abernix

This comment has been minimized.

Member

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

This comment has been minimized.

Member

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:

@M4v3R

This comment has been minimized.

Contributor

M4v3R 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

@abernix

LGTM.

@abernix abernix changed the base branch from release-1.5 to devel Feb 23, 2017

@abernix abernix changed the base branch from devel to release-1.5 Feb 23, 2017

@abernix

This comment has been minimized.

Member

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

@stubailo stubailo referenced this pull request Mar 1, 2017

Closed

Idea: remove jquery #50

@abernix abernix modified the milestones: Release 1.4.3.x, Release 1.5 Mar 9, 2017

@abernix

This comment has been minimized.

Member

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

This comment has been minimized.

haojia321 commented Mar 16, 2017

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

This comment has been minimized.

Contributor

stubailo commented Mar 16, 2017

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

@abernix

This comment has been minimized.

Member

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 referenced this pull request Mar 4, 2018

Closed

$ is not defined #9718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment