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

View File

@@ -0,0 +1,49 @@
import path from 'node:path'
import { file } from '@aklive2d/libs'
import config from '@aklive2d/config'
import { DIST_DIR } from '../index.ts'
export default async (packageDir: string) => {
const copyQueue = [
{
fn: file.symlink,
source: path.resolve(
packageDir,
'background',
config.dir_name.dist
),
target: path.resolve(DIST_DIR, config.module.assets.background),
},
{
fn: file.symlink,
source: path.resolve(
packageDir,
'charword-table',
config.dir_name.dist
),
target: path.resolve(DIST_DIR, config.module.assets.charword_table),
},
{
fn: file.symlink,
source: path.resolve(packageDir, 'music', config.dir_name.data),
target: path.resolve(DIST_DIR, config.module.assets.music),
},
{
fn: file.symlinkAll,
source: path.resolve(packageDir, 'operator', config.dir_name.dist),
target: path.resolve(DIST_DIR),
},
{
fn: file.symlink,
source: path.resolve(
packageDir,
'project-json',
config.dir_name.dist
),
target: path.resolve(DIST_DIR, config.module.assets.project_json),
},
]
copyQueue.map(({ fn, source, target }) => {
fn(source, target)
})
}