feat: migrate to turbo (#22)
* feat: migrate top turbo * ci: ci test * fix: fix codeql issues * feat: ci test * chore: lint * chore: misc changes * feat: rename vite helpers * feat: use fetch to handle assets * feat: update directory * feat: fetch charword table * feat: migrate download game data and detect missing voice files * feat: symlink relative path * feat: finish wrangler upload * feat: migrate wrangler download * feat: finish * chore: auto update * ci: update ci * ci: update ci --------- Co-authored-by: Halyul <Halyul@users.noreply.github.com>
This commit is contained in:
30
packages/assets/runner.js
Normal file
30
packages/assets/runner.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import path from 'node:path'
|
||||
import fs from 'node:fs'
|
||||
import { envParser } from '@aklive2d/libs'
|
||||
import config from '@aklive2d/config'
|
||||
import build from './libs/build.js'
|
||||
import download from './libs/download.js'
|
||||
|
||||
const packageDir = path.resolve(import.meta.dirname, '..')
|
||||
const dataDir = path.resolve(import.meta.dirname, config.dir_name.data)
|
||||
|
||||
async function main() {
|
||||
const { mode } = envParser.parse({
|
||||
mode: {
|
||||
type: 'string',
|
||||
short: 'm',
|
||||
},
|
||||
})
|
||||
switch (mode) {
|
||||
case 'build':
|
||||
await build(packageDir)
|
||||
break
|
||||
case 'download':
|
||||
await download(dataDir)
|
||||
break
|
||||
default:
|
||||
throw new Error(`Unknown mode: ${mode}`)
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user