feat: migrated packages to ts

This commit is contained in:
Haoyu Xu
2025-05-02 02:27:42 +08:00
parent 0af0c785d4
commit 8f6f537c81
111 changed files with 3166 additions and 1155 deletions

29
packages/assets/runner.ts Normal file
View File

@@ -0,0 +1,29 @@
import path from 'node:path'
import { envParser } from '@aklive2d/libs'
import config from '@aklive2d/config'
import build from './libs/build.ts'
import download from './libs/download.ts'
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()