darkness-dependent-vision/src/hooks/init.js

22 lines
553 B
JavaScript
Raw Normal View History

2021-06-29 20:40:54 +02:00
// SPDX-FileCopyrightText: 2021 Johannes Loher
//
// SPDX-License-Identifier: MIT
import { packageName } from '../config';
import registerHandlebarsPartials from '../handlebars-partials';
2021-06-29 20:40:54 +02:00
import logger from '../logger';
import { registerMixins } from '../mixins/index.js';
import registerSettings from '../setiings';
2021-06-29 20:40:54 +02:00
export default function registerForInitHook() {
Hooks.on('init', onInit);
}
async function onInit() {
2021-06-29 20:40:54 +02:00
logger.info(`Initializing ${packageName}`);
registerMixins();
registerSettings();
await registerHandlebarsPartials();
2021-06-29 20:40:54 +02:00
}