1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 08:27:42 +02:00

Upgrade ember-cli to 0.1.4 and fix related breakage. closes #18

This commit is contained in:
Toby Zerner
2014-12-23 12:45:07 +10:30
parent 9365205ac4
commit 238bb40360
28 changed files with 225 additions and 509 deletions

View File

@@ -1,30 +1,19 @@
/* global require */
var Application = require('flarum/app')['default'];
var Router = require('flarum/router')['default'];
import Ember from 'ember';
import Application from '../../app';
import Router from '../../router';
import config from '../../config/environment';
export default function startApp(attrs) {
var App;
var attributes = Ember.merge({
// useful Test defaults
rootElement: '#ember-testing',
LOG_ACTIVE_GENERATION:false,
LOG_VIEW_LOOKUPS: false
}, attrs); // but you can override;
var attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
Router.reopen({
location: 'none'
});
Ember.run(function(){
Ember.run(function() {
App = Application.create(attributes);
App.setupForTesting();
App.injectTestHelpers();
});
App.reset(); // this shouldn't be needed, i want to be able to "start an app at a specific URL"
return App;
}