mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
fa84808048
no issue Since `ember-moment@10.0` it's not been necessary to use the `ember-cli-moment-shim` package, with `moment` instead being usable directly via `ember-auto-import`. Getting rid of the shim package is necessary for compatibility with `embroider`, Ember's new build tooling. - dropped `ember-cli-moment-shim` dependency - added `moment-timezone` dependency and updated all imports to reflect the different package - worked around `ember-power-calendar` having `ember-cli-moment-shim` as a sub-dependency - added empty in-repo-addon `ember-power-calendar-moment` to avoid `ember-power-calendar` complaining about a missing package - added `ember-power-calendar-utils` in-repo-addon that is a copy of `ember-power-calendar-moment` but without the build-time renaming of the tree for better compatibility with embroider
49 lines
1.1 KiB
JavaScript
Executable File
49 lines
1.1 KiB
JavaScript
Executable File
import 'ghost-admin/utils/link-component';
|
|
import 'ghost-admin/utils/route';
|
|
import Application from '@ember/application';
|
|
import Resolver from 'ember-resolver';
|
|
import config from 'ghost-admin/config/environment';
|
|
import loadInitializers from 'ember-load-initializers';
|
|
import moment from 'moment-timezone';
|
|
import {registerWarnHandler} from '@ember/debug';
|
|
|
|
moment.updateLocale('en', {
|
|
relativeTime: {
|
|
m: '1 minute'
|
|
}
|
|
});
|
|
|
|
const App = Application.extend({
|
|
Resolver,
|
|
modulePrefix: config.modulePrefix,
|
|
podModulePrefix: config.podModulePrefix,
|
|
|
|
// eslint-disable-next-line
|
|
customEvents: {
|
|
touchstart: null,
|
|
touchmove: null,
|
|
touchend: null,
|
|
touchcancel: null
|
|
}
|
|
});
|
|
|
|
// TODO: remove once the validations refactor is complete
|
|
// eslint-disable-next-line
|
|
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;
|