mirror of
https://github.com/gromlab-ru/svg-sprites.git
synced 2026-07-22 04:40:17 +03:00
feat: standalone mode
This commit is contained in:
@@ -33,7 +33,10 @@ export async function generateSprite(
|
||||
})
|
||||
const plannedPaths = new Set(plan.files.map((file) => file.path.replaceAll('\\', '/')))
|
||||
|
||||
for (const requiredPath of [plan.paths.entry, plan.paths.sprite, plan.paths.manifest]) {
|
||||
const resultPaths = [plan.paths.sprite, plan.paths.manifest]
|
||||
if (plan.paths.entry) resultPaths.push(plan.paths.entry)
|
||||
|
||||
for (const requiredPath of resultPaths) {
|
||||
if (!plannedPaths.has(requiredPath)) {
|
||||
throw new Error(`Mode "${config.mode}" result path is missing from its output plan: ${requiredPath}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user