mirror of
https://github.com/flarum/core.git
synced 2025-08-10 18:35:56 +02:00
Upgrade ember-cli to 0.1.4 and fix related breakage. closes #18
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import Resolver from 'ember/resolver';
|
||||
import config from '../../config/environment';
|
||||
|
||||
var resolver = Resolver.create();
|
||||
|
||||
resolver.namespace = {
|
||||
modulePrefix: 'flarum'
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix
|
||||
};
|
||||
|
||||
export default resolver;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user