Close #236 add tag generators

This commit is contained in:
Misode
2022-05-25 03:57:55 +02:00
parent 781d545962
commit 32e6d5c167
6 changed files with 59 additions and 2 deletions

View File

@@ -129,7 +129,8 @@ export function getFilePath(file: ProjectFile) {
}
const gen = config.generators.find(g => g.id === file.type)
if (!gen) {
throw new Error(`Cannot find generator of type ${file.type}`)
console.error(`Cannot find generator of type ${file.type}`)
return undefined
}
return `data/${namespace}/${gen.path ?? gen.id}/${id}`
}