* 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>
50 lines
1.4 KiB
JavaScript
50 lines
1.4 KiB
JavaScript
import path from 'node:path'
|
|
import { file } from '@aklive2d/libs'
|
|
import config from '@aklive2d/config'
|
|
import { DIST_DIR } from '../index.js'
|
|
|
|
export default async (packageDir) => {
|
|
const copyQueue = [
|
|
{
|
|
fn: file.symlink,
|
|
source: path.resolve(
|
|
packageDir,
|
|
'background',
|
|
config.dir_name.dist
|
|
),
|
|
target: path.resolve(DIST_DIR, config.dir_name.background),
|
|
},
|
|
{
|
|
fn: file.symlink,
|
|
source: path.resolve(
|
|
packageDir,
|
|
'charword-table',
|
|
config.dir_name.dist
|
|
),
|
|
target: path.resolve(DIST_DIR, config.dir_name.charword_table),
|
|
},
|
|
{
|
|
fn: file.symlink,
|
|
source: path.resolve(packageDir, 'music', config.dir_name.data),
|
|
target: path.resolve(DIST_DIR, config.dir_name.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.dir_name.project_json),
|
|
},
|
|
]
|
|
copyQueue.map(({ fn, source, target }) => {
|
|
fn(source, target)
|
|
})
|
|
}
|