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

Implement tour bot #3

Merged
merged 13 commits into from
Oct 20, 2016
Merged

Implement tour bot #3

merged 13 commits into from
Oct 20, 2016

Conversation

James-Byrne
Copy link
Collaborator

No description provided.

@marjaimate
Copy link
Member

@James-Byrne why did you remove the Ember.$ and switched to jquery $? I'm just curious.

@marjaimate marjaimate merged commit b14f8de into master Oct 20, 2016
@James-Byrne
Copy link
Collaborator Author

James-Byrne commented Oct 20, 2016

@marjaimate , I've been reading a lot of Ember code recently and I've noticed a few different things that people do. That syntax of importing only the required parts from ember is one of them and I've mostly seen it in code written by ember core members. So I thought I'd try it and see if there was much of a difference.

I wouldn't say its improved the performance of the code since the whole of Ember is included in the line previous. However it does allow the code to be a little more concise. Having a breakdown of what elements are being used can also be a form of self-documentation which I really like.

I think the reason I'm seeing it in some of the repos I've looked at is the movement towards the following syntax for importing parts of ember.

const { Component, computed } = 'ember';

This will go along with the new file-structure for ember components which has an _enormous_ discussion thread here.

But basically I just said I'd give it a go, since the shop is quite small and their are only 3-4 files I thought this would be a good opportunity to try it out. Also as far as I know, Ember.$ is the exact same as just $. since Ember bundles a version of jquery with itself. Either way since I imported $ from Ember then Ember.$ and $ should be the same thing.

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.

2 participants