mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
1a093d5324
no issue - our custom validation engine makes extensive use of `DS.Errors` which fills the console and especially the test logs with a ton of warnings, this change adds a handler to skip the warnings that we don't care about at the moment - should be removed when we merge the validations refactor
44 lines
1.0 KiB
JavaScript
Executable File
44 lines
1.0 KiB
JavaScript
Executable File
import Ember from 'ember';
|
|
import Application from 'ember-application';
|
|
import Resolver from './resolver';
|
|
import loadInitializers from 'ember-load-initializers';
|
|
import 'ghost-admin/utils/route';
|
|
import 'ghost-admin/utils/link-component';
|
|
import 'ghost-admin/utils/text-field';
|
|
import config from './config/environment';
|
|
|
|
Ember.MODEL_FACTORY_INJECTIONS = true;
|
|
|
|
let App = Application.extend({
|
|
Resolver,
|
|
modulePrefix: config.modulePrefix,
|
|
podModulePrefix: config.podModulePrefix,
|
|
|
|
customEvents: {
|
|
touchstart: null,
|
|
touchmove: null,
|
|
touchend: null,
|
|
touchcancel: null
|
|
}
|
|
});
|
|
|
|
// TODO: remove once the validations refactor is complete
|
|
// eslint-disable-next-line
|
|
Ember.Debug.registerWarnHandler((message, options, next) => {
|
|
let skip = [
|
|
'ds.errors.add',
|
|
'ds.errors.remove',
|
|
'ds.errors.clear'
|
|
];
|
|
|
|
if (skip.includes(options.id)) {
|
|
return;
|
|
}
|
|
|
|
next(message, options);
|
|
});
|
|
|
|
loadInitializers(App, config.modulePrefix);
|
|
|
|
export default App;
|