-
Notifications
You must be signed in to change notification settings - Fork 287
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
- Refactor ember-debug to use ES6. #387
Conversation
fb5588b
to
8820c43
Compare
👍 Thanks @Mawaheb! I will review this weekend at the latest. |
No problem :) My pleasure. |
self.onConnectionReady(); | ||
const Ember = window.Ember; | ||
const { $, A, computed, RSVP, Object } = Ember; | ||
const { Promise } = RSVP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { Promise, resolve } = RSVP;
8820c43
to
7e87462
Compare
Thanks for your feedback @patsy-issa :), I made the changes accordingly. |
Np ^^ I ll take a look at the other files when I have the time. |
RSVP.resolve(this.connect(), 'ember-inspector').then(function() { | ||
self.onConnectionReady(); | ||
const Ember = window.Ember; | ||
const { $, A, computed, RSVP, Object } = Ember; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Object
has meaning in native javascript. You should rename it to something like EmberObject
:
const { $, A, computed, RSVP, Object: EmberObject } = Ember;
|
||
var ViewDebug = Ember.Object.extend(PortMixin, { | ||
const ViewDebug = Object.extend(PortMixin, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export default
@Mawaheb this is great!
Yeah vendor files are not transpiled. We can't (and shouldn't) refactor them.
You can declare them as variables instead of functions: const pinView = () => {
};
Ember.deprecate = (message, test, options) => {
}; |
fcb5db3
to
99a0277
Compare
Thank you for your feedback, I modified the code accordingly. One thing, When I pulled the latest master, and when I rebased, there were some merge/rebase conflicts, I hope I fixed them the right way. |
Sorry @Mawaheb this needs another rebase. |
c9afc0d
to
d768377
Compare
Sorry for the inconvenience, I hope I got it right this time @teddyzeenny :) |
this._super(); | ||
$(window).off(this.get('eventNamespace')); | ||
$(layerDiv).remove(); | ||
$(previewDiv).remove(); | ||
this.get('_lastNodes').clear(); | ||
View.removeMutationListener(this.viewTreeChanged); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed.
- Minor fixes.
d768377
to
3cb4460
Compare
I made the changes you mentioned, Please let me know if there are any further changes that should be made. |
- Refactor ember-debug to use ES6.
Thanks @Mawaheb! |
my pleasure :). |
OK, I believe this is ready, But, there are a few problems that I faced:
/vendor
, when I tried, I got an error "Can't use block-scoped let, const out of restricted mode."this
instead ofself
similar problem with this one
As always, Any suggestions, comments, notes, things to be changed or feedback is always appreciated