2022-01-11 20:27:08 +01:00
|
|
|
require('../styles/application.scss');
|
2022-01-09 02:14:53 +01:00
|
|
|
|
2022-10-02 22:09:01 +02:00
|
|
|
import { Application } from '@hotwired/stimulus';
|
|
|
|
import { definitionsFromContext } from '@hotwired/stimulus-webpack-helpers';
|
|
|
|
|
2021-12-25 00:02:52 +01:00
|
|
|
import start from 'retrospring/common';
|
|
|
|
import initAnswerbox from 'retrospring/features/answerbox/index';
|
|
|
|
import initInbox from 'retrospring/features/inbox/index';
|
2021-12-25 03:33:09 +01:00
|
|
|
import initUser from 'retrospring/features/user';
|
2021-12-23 01:20:47 +01:00
|
|
|
import initSettings from 'retrospring/features/settings/index';
|
2021-12-28 21:12:33 +01:00
|
|
|
import initLists from 'retrospring/features/lists';
|
2022-01-03 22:21:00 +01:00
|
|
|
import initQuestionbox from 'retrospring/features/questionbox';
|
2022-01-04 18:45:32 +01:00
|
|
|
import initQuestion from 'retrospring/features/question';
|
2022-01-08 02:51:23 +01:00
|
|
|
import initModeration from 'retrospring/features/moderation';
|
2022-01-13 23:01:42 +01:00
|
|
|
import initMemes from 'retrospring/features/memes';
|
2022-01-13 23:43:35 +01:00
|
|
|
import initLocales from 'retrospring/features/locales';
|
2022-04-10 02:37:54 +02:00
|
|
|
import initFront from 'retrospring/features/front';
|
2022-09-11 20:42:40 +02:00
|
|
|
import initWebpush from 'retrospring/features/webpush';
|
2020-12-26 18:16:08 +01:00
|
|
|
|
|
|
|
start();
|
2022-01-09 15:17:03 +01:00
|
|
|
document.addEventListener('DOMContentLoaded', initAnswerbox);
|
2022-01-03 15:04:23 +01:00
|
|
|
document.addEventListener('DOMContentLoaded', initInbox);
|
2021-12-28 21:12:33 +01:00
|
|
|
document.addEventListener('DOMContentLoaded', initUser);
|
2022-09-04 14:34:40 +02:00
|
|
|
document.addEventListener('turbo:load', initSettings);
|
2022-01-03 22:21:00 +01:00
|
|
|
document.addEventListener('DOMContentLoaded', initLists);
|
2022-10-11 22:08:59 +02:00
|
|
|
document.addEventListener('turbo:load', initQuestionbox);
|
2022-01-08 02:51:23 +01:00
|
|
|
document.addEventListener('DOMContentLoaded', initQuestion);
|
2022-01-09 17:26:38 +01:00
|
|
|
document.addEventListener('DOMContentLoaded', initModeration);
|
2022-01-13 23:01:42 +01:00
|
|
|
document.addEventListener('DOMContentLoaded', initMemes);
|
2022-09-04 14:34:40 +02:00
|
|
|
document.addEventListener('turbo:load', initLocales);
|
2022-10-02 22:09:01 +02:00
|
|
|
document.addEventListener('turbo:load', initFront);
|
2022-09-11 20:42:40 +02:00
|
|
|
document.addEventListener('DOMContentLoaded', initWebpush);
|
2022-10-02 22:09:01 +02:00
|
|
|
|
|
|
|
window['Stimulus'] = Application.start();
|
|
|
|
const context = require.context('../retrospring/controllers', true, /\.ts$/);
|
|
|
|
window['Stimulus'].load(definitionsFromContext(context));
|