-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
ES6 & Broccoli #65
Comments
Only reason I don't jump on that bandwagon is that I hate importing every little thing I want to use in every file. I am dreading moving to ember-cli because I will then have to import everything manually in my codebase ( use ember rails now, where I import stuff with sprockets ... all in one place .. easy ). |
I would also love to use this in our new Ember CLI project with ES6 and broccoli (.NET backend :() |
ok .. what the heck .. if you want to do this @pedrokiefer .. I am up for pulling this in. |
On the long run ES6 will be standard, so migrating to it is just a matter o time. All the imports can be troublesome, but I think it actually makes you write better JS code, splinting concerns to different files and handling namespace clashes. I think ES6 is a good thing. Using grunt, broccoli or being an ember-cli addon is another matter. I thinks we should do this in parts, get the code ES6 compliant (still using grunt), if everything is good and working, then choose what build tool works better for the community. I'll start working on a PR for moving to ES6. |
Agree @pedrokiefer .. and working in stages = good. |
So maybe you can help with a little setup problem i have with Ember cli. I'm getting this error: beforeEach failed on Load the subcourses page: 'undefined' is not a function (evaluating 'TestHelper.setup(App)') my test looks like this: import Ember from 'ember';
import startApp from 'capp-front/tests/helpers/start-app';
import textMixin from 'factory-guy';
var TestHelper = Ember.Object.createWithMixins(textMixin);
var testHelper, make, store, App;
module('Integration: Show the subcourses index', {
setup:
function () {
App = startApp();
testHelper = TestHelper.setup(App);
store = testHelper.getStore();
make = testHelper.make.bind(testHelper);
},
teardown: function () {
Ember.run(App, 'destroy');
Ember.run(function () { testHelper.teardown(); });
},
});
test('Load the subcourses page', function () {
var course = make('course');
visit('/courses/' + course.get('id') + '/sub-courses');
andThen(function () {
var actual = currentRouteName();
var expected = 'course.sub-courses';
equal(actual, expected, 'expected ' + expected + ' but got ' + actual);
});
}); Is there something i'm forgetting in the setup? |
@Marthyn probably a typo, you are importing textMixin and not testMixin ;) |
jup thats it, thanks! Stupid me :) |
@pedrokiefer .. have you started on the ES6 thing?. I was going to add a feature, but don't want to do it in the middle of that change. If you have not started .. I might also take a crack at it myself today. |
@danielspaniel I've started, but got busy with some stuff at work and didn't have time to finish it. It's still on my ToDo list. What I did so far:
I was trying to figure out how to make grunt spill out AMD, globals and browser versions of the code, got somewhat stuck here. Still need a solution on how to handle the store.js, which reopens DS.Store for patching its methods. |
Here's are hints at how to get past the things your stuck on: http://www.thomasboyt.com/2013/06/21/es6-module-transpiler |
Might have to do this myself .. since I want to upgrade to es6 and make this an add on ( deprecating of ember-cli-data-factory-guy ) . If you have enough to show .. maybe I will take a look at your fork and see what I can cherry pick? |
What do you think about migrating to ES6 and using Broccoli as the build chain? As that seems to be the default for all ember related projects.
If that is something you would like to have on the project I can work on a PR for that.
The text was updated successfully, but these errors were encountered: