-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.js
More file actions
47 lines (39 loc) · 1.62 KB
/
main.js
File metadata and controls
47 lines (39 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Import TypeScript modules
import * as Constants from './module/constants.js';
import * as Logger from './module/logger.js'
import { registerSettings } from './module/settings.js';
import * as JournalSync from './module/journal-sync.js'
/* ------------------------------------ */
/* Initialize module */
/* ------------------------------------ */
Hooks.once('init', async function () {
Logger.log(`Initializing ${Constants.MODULE_NAME}`);
Logger.log(" ___ _ __, ");
Logger.log(" ( / // ( ");
Logger.log(" / __ , , _ _ _ __, // `. __ , _ _ _,");
Logger.log(" _/_(_)(_/_/ (_/ / /_(_/(_(/_---(___)/ (_/_/ / /_(__");
Logger.log(" // / ");
Logger.log("(/ ' ");
// Assign custom classes and constants here
// Register custom module settings
await registerSettings();
// // Preload Handlebars templates
// await preloadTemplates();
await JournalSync.initModule();
// Register custom sheets (if any)
});
/* ------------------------------------ */
/* Setup module */
/* ------------------------------------ */
Hooks.once('setup', async function () {
// Do anything after initialization but before
// ready
});
/* ------------------------------------ */
/* When ready */
/* ------------------------------------ */
Hooks.once('ready', async function () {
// Do anything once the module is ready
await JournalSync.readyModule();
});
// Add any additional hooks if necessary