feat(aklive2d): add directory building

- rename __dirname to __projectRoot
- rename runner.js to aklive2d.js
- add npm scripts
- add directory building commands (dev/build)
This commit is contained in:
Haoyu Xu
2023-02-20 18:15:16 -05:00
parent 0e4017351d
commit 6307bfd017
17 changed files with 389 additions and 735 deletions

View File

@@ -9,9 +9,9 @@ export default function init(operatorName, extractedDir) {
mkdir(dir)
})
const date = new Date()
const template = readYAML(path.join(__dirname, 'config', '_template.yaml'))
const template = readYAML(path.join(__projetRoot, 'config', '_template.yaml'))
template.link = operatorName
template.date = `${date.getFullYear()}/${(date.getMonth() + 1).toString().padStart(2, '0') }`
writeSync(stringify(template), path.join(__dirname, 'config', `${operatorName}.yaml`))
writeSync(stringify(template), path.join(__projetRoot, 'config', `${operatorName}.yaml`))
appendMainConfig(operatorName)
}