inline styles and actor embeds
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
export const MODULE_ID = "mb-cypher2";
|
||||
|
||||
export function log(...args) {
|
||||
console.log(`${MODULE_ID} |`, ...args);
|
||||
}
|
||||
|
||||
export function normalizeTemplatePaths(paths, baseDir = "") {
|
||||
const templates = {};
|
||||
log("finding templates", paths, baseDir);
|
||||
const basePath = `modules/${MODULE_ID}/templates${baseDir ? "/" + baseDir : ""}`;
|
||||
for (const file of paths) {
|
||||
templates[file] = `${basePath}/${file}`;
|
||||
}
|
||||
return templates;
|
||||
}
|
||||
|
||||
export async function preloadTemplatePaths(normalizedPaths) {
|
||||
return loadTemplates(Object.values(normalizedPaths));
|
||||
}
|
||||
Reference in New Issue
Block a user