bol/module/system/templates.js

40 lines
2.0 KiB
JavaScript
Raw Normal View History

2021-07-08 10:12:12 +02:00
/**
* Define a set of template paths to pre-load
* Pre-loaded templates are compiled and cached for fast access when rendering
* @return {Promise}
*/
export const preloadHandlebarsTemplates = async function () {
// Define template paths to load
const templatePaths = [
// ACTORS
"systems/bol/templates/actor/parts/actor-header.hbs",
"systems/bol/templates/actor/parts/tabs/actor-stats.hbs",
"systems/bol/templates/actor/parts/tabs/actor-combat.hbs",
"systems/bol/templates/actor/parts/tabs/actor-actions.hbs",
"systems/bol/templates/actor/parts/tabs/actor-features.hbs",
"systems/bol/templates/actor/parts/tabs/actor-equipment.hbs",
// ITEMS
"systems/bol/templates/item/parts/item-header.hbs",
"systems/bol/templates/item/parts/properties/feature-properties.hbs",
2021-11-08 14:40:29 +01:00
"systems/bol/templates/item/parts/properties/item-properties.hbs",
"systems/bol/templates/item/parts/properties/item/equipment-properties.hbs",
"systems/bol/templates/item/parts/properties/item/capacity-properties.hbs",
"systems/bol/templates/item/parts/properties/item/vehicle-properties.hbs",
"systems/bol/templates/item/parts/properties/item/protection-properties.hbs",
"systems/bol/templates/item/parts/properties/item/weapon-properties.hbs",
"systems/bol/templates/item/parts/properties/item/magical-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/career-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/boon-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/flaw-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/origin-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/race-properties.hbs",
2021-11-08 14:40:29 +01:00
// DIALOGS
"systems/bol/templates/roll/parts/roll-dialog-modifiers.hbs",
"systems/bol/templates/roll/parts/roll-dialog-attribute.hbs"
2021-07-08 10:12:12 +02:00
];
// Load the template parts
return loadTemplates(templatePaths);
};