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:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user