(root: string)
| 416 | } |
| 417 | |
| 418 | function pruneEmptyDemoDirs(root: string) { |
| 419 | const candidates = ['src/routes/demo', 'src/routes/example'] |
| 420 | for (const rel of candidates) { |
| 421 | const dir = resolve(root, rel) |
| 422 | if (!fs.existsSync(dir)) continue |
| 423 | try { |
| 424 | if (fs.readdirSync(dir).length === 0) { |
| 425 | fs.rmdirSync(dir) |
| 426 | } |
| 427 | } catch { |
| 428 | // ignore |
| 429 | } |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | function findExclusiveConflicts( |
| 434 | addOns: Options['chosenAddOns'], |