1
0
Fork 0

logs for testing production requires

Dieser Commit ist enthalten in:
Angus McLeod 2017-11-02 08:50:24 +08:00
Ursprung 52da1744a0
Commit 80fccbf093
2 geänderte Dateien mit 13 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -1,5 +1,16 @@
import WizardApplication from 'wizard/wizard'; import WizardApplication from 'wizard/wizard';
export default WizardApplication.extend({ export default WizardApplication.extend({
rootElement: '#custom-wizard-main' rootElement: '#custom-wizard-main',
start() {
Object.keys(requirejs._eak_seen).forEach(key => {
if (/\/initializers\//.test(key)) {
console.log('running initializer', key);
const module = requirejs(key, null, null, true);
if (!module) { throw new Error(key + ' must export an initializer.'); }
this.initializer(module.default);
}
});
}
}); });

Datei anzeigen

@ -2,6 +2,7 @@ export default {
name: 'custom-routes', name: 'custom-routes',
initialize(app) { initialize(app) {
console.log('running initializer', app.constructor.name, app.get('rootElement'))
if (app.constructor.name !== 'Class' || app.get('rootElement') !== '#custom-wizard-main') return; if (app.constructor.name !== 'Class' || app.get('rootElement') !== '#custom-wizard-main') return;
const Router = requirejs('wizard/router').default; const Router = requirejs('wizard/router').default;