Make it so that I can specifically code some aliases for handlebar partials

This commit is contained in:
Oliver-Akins 2024-03-23 13:01:07 -06:00
parent 07517658e7
commit 8ef9bd2550

View file

@ -30,6 +30,10 @@ export const partials = [
`actors/char-sheet/v2/partials/inventory/items/untyped.v2.pc.hbs`, `actors/char-sheet/v2/partials/inventory/items/untyped.v2.pc.hbs`,
]; ];
export const preAliasedPartials = {
"dotdungeon.pc.v2.foil": "actors/char-sheet/v2/partials/inventory/items/untyped.v2.pc.hbs",
};
export const icons = [ export const icons = [
`caret-right.svg`, `caret-right.svg`,
`caret-down.svg`, `caret-down.svg`,
@ -59,6 +63,10 @@ export async function preloadHandlebarsTemplates() {
const paths = {}; const paths = {};
for (const alias in preAliasedPartials) {
paths[alias] = `${pathPrefix}${preAliasedPartials[alias]}`;
};
for ( const partial of partials ) { for ( const partial of partials ) {
console.debug(`Loading partial: ${partial}`); console.debug(`Loading partial: ${partial}`);
const path = `${pathPrefix}${partial}`; const path = `${pathPrefix}${partial}`;