-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Use ember-suave and standardise client's es6 usage #6020
Conversation
3e27664
to
39c1fb2
Compare
Regarding DavyJonesLocker/ember-suave#77
I think we should probably follow suit as I can't fault their arguments and it will probably solve a lot of explanation about |
Regarding
When I get around to rebasing this I'll be making the above changes too unless there are any objections. |
I may be biased about ember-suave, but I do like it. 😜 |
This makes perfect sense IMO. I'm keen to use |
6e7aae6
to
f3a0638
Compare
7e40c31
to
7d4d090
Compare
no issue - add ember-suave dependency - upgrade grunt-jscs dependency - add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc - separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc - standardize es6 usage across client
Use ember-suave and standardise client's es6 usage
no issue
ES6 is seeing rapid adoption across the ember core and community in general, this is an attempt to bring Ghost in line with the accepted coding style.
Aside from the general es6-isms,
Ember.*
andDS.*
modules are pulled out and defined at the top of the files ready for when these modules are pulled out into ES2015 modules that can be imported directly. I believe there are plans to eventually use this within the build process to only pull in Ember code that our application is using giving us smaller builds and faster download/parsing.I've created as a quick spike for now in order to gather thoughts and discussion from the rest of the team. Please let me know if there's anything in particular you think is confusing, difficult to parse or too different to the server-side!
Outstanding issues:
Ember.Object
,Ember.String
,Ember.$
have not yet been moved into theEmber
object destructuring assignment as they generate warnings about overriding existing vars. Need to decide to skip those for now or find a way to suppress the warnings.Ember.A()
(builds an Ember.NativeArray instance) andEmber.K()
(empty function that returnsthis
) have not been moved to theEmber
destructuring assignment because I'm not a fan of the one-char function names.this
scope, should the fat arrow syntax be used anywhere else? Is the non-parens version preferable in certain circumstances?