chore: config updates
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
dynchars: dynchars
|
||||
item_to_download:
|
||||
- homebackground/wrapper
|
||||
- ui_camp_logo
|
||||
- charportraits
|
||||
- voice.*/extra
|
||||
- homebackground/wrapper
|
||||
- ui_camp_logo
|
||||
- charportraits
|
||||
- voice.*/extra
|
||||
additional_regex:
|
||||
- ^(?!(avg))(.*)$
|
||||
- ^(?!(avg))(.*)$
|
||||
|
||||
@@ -5,7 +5,7 @@ import { yaml } from '@aklive2d/libs'
|
||||
export const DIST_DIR = path.resolve(import.meta.dirname, config.dir_name.dist)
|
||||
export const CONFIG_PATH = path.resolve(
|
||||
import.meta.dirname,
|
||||
config.dir_name.config_yaml
|
||||
config.module.assets.config_yaml
|
||||
)
|
||||
const selfConfig = yaml.read(CONFIG_PATH)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export default async (packageDir) => {
|
||||
'background',
|
||||
config.dir_name.dist
|
||||
),
|
||||
target: path.resolve(DIST_DIR, config.dir_name.background),
|
||||
target: path.resolve(DIST_DIR, config.module.assets.background),
|
||||
},
|
||||
{
|
||||
fn: file.symlink,
|
||||
@@ -21,12 +21,12 @@ export default async (packageDir) => {
|
||||
'charword-table',
|
||||
config.dir_name.dist
|
||||
),
|
||||
target: path.resolve(DIST_DIR, config.dir_name.charword_table),
|
||||
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.dir_name.music),
|
||||
target: path.resolve(DIST_DIR, config.module.assets.music),
|
||||
},
|
||||
{
|
||||
fn: file.symlinkAll,
|
||||
@@ -40,7 +40,7 @@ export default async (packageDir) => {
|
||||
'project-json',
|
||||
config.dir_name.dist
|
||||
),
|
||||
target: path.resolve(DIST_DIR, config.dir_name.project_json),
|
||||
target: path.resolve(DIST_DIR, config.module.assets.project_json),
|
||||
},
|
||||
]
|
||||
copyQueue.map(({ fn, source, target }) => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
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'
|
||||
|
||||
@@ -6,8 +6,13 @@ insight:
|
||||
id: aklive2d
|
||||
url: https://insight.halyul.dev/on-demand.js
|
||||
module:
|
||||
background:
|
||||
assets:
|
||||
config_yaml: config.yaml
|
||||
background: background
|
||||
music: music
|
||||
charword_table: charword_table
|
||||
project_json: project_json
|
||||
background:
|
||||
operator_bg_png: operator_bg.png
|
||||
charword_table:
|
||||
charword_table_json: charword_table.json
|
||||
@@ -18,15 +23,16 @@ module:
|
||||
official_info:
|
||||
official_info_json: official_info.json
|
||||
operator:
|
||||
operator: operator
|
||||
config: config
|
||||
template_yaml: _template.yaml
|
||||
config_yaml: config.yaml
|
||||
portraits: _portraits
|
||||
logos_assets: _logos
|
||||
logos: logos
|
||||
directory_assets: _directory
|
||||
MonoBehaviour: MonoBehaviour
|
||||
Texture2D: Texture2D
|
||||
assets_json: assets.json
|
||||
title:
|
||||
zh-CN: '明日方舟:'
|
||||
en-US: 'Arknights: '
|
||||
@@ -36,21 +42,17 @@ module:
|
||||
template_yaml: project_json.yaml
|
||||
wrangler:
|
||||
index_json: index.json
|
||||
vite_helpers:
|
||||
config_json: config.json
|
||||
app:
|
||||
showcase:
|
||||
public: public
|
||||
assets: assets
|
||||
dir_name:
|
||||
config_yaml: config.yaml
|
||||
assets: assets
|
||||
data: data
|
||||
dist: dist
|
||||
extracted: extracted
|
||||
auto_update: auto_update
|
||||
operator: operator
|
||||
background: background
|
||||
music: music
|
||||
logos: logos
|
||||
public: public
|
||||
charword_table: charword_table
|
||||
project_json: project_json
|
||||
config_json: config.json
|
||||
voice:
|
||||
main: voice
|
||||
sub:
|
||||
@@ -69,10 +71,6 @@ dir_name:
|
||||
- name: custom
|
||||
lang: CUSTOM
|
||||
lookup_region: zh_CN
|
||||
share:
|
||||
title:
|
||||
zh-CN: '明日方舟:'
|
||||
en-US: 'Arknights: '
|
||||
directory:
|
||||
assets_dir: _assets
|
||||
title: AKLive2D
|
||||
|
||||
@@ -35,7 +35,7 @@ const getConfigFolder = () => {
|
||||
}
|
||||
|
||||
const getDistFolder = (name) => {
|
||||
return path.join(DIST_DIR, config.dir_name.operator, name)
|
||||
return path.join(DIST_DIR, config.module.operator.operator, name)
|
||||
}
|
||||
|
||||
export const has = (name) => {
|
||||
@@ -77,7 +77,7 @@ const copyVoices = (name) => {
|
||||
const copyLogos = () => {
|
||||
file.symlink(
|
||||
path.join(OPERATOR_SOURCE_FOLDER, config.module.operator.logos_assets),
|
||||
path.join(DIST_DIR, config.dir_name.logos)
|
||||
path.join(DIST_DIR, config.module.operator.logos)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ export const init = (name, id) => {
|
||||
path.resolve(operatorConfigFolder, `${name}.yaml`)
|
||||
)
|
||||
file.appendSync(
|
||||
`\n${name}: !include ${config.module.operator.config}/${name}.yaml`,
|
||||
`${name}: !include ${config.module.operator.config}/${name}.yaml\n`,
|
||||
CONFIG_PATH
|
||||
)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export const copyShowcaseData = (name, { dataDir, publicAssetsDir }) => {
|
||||
file.mkdir(publicAssetsDir)
|
||||
const operatorAssetsDir = path.join(
|
||||
ASSETS_DIST_DIR,
|
||||
config.dir_name.operator,
|
||||
config.module.operator.operator,
|
||||
name
|
||||
)
|
||||
const spineFilenames = file
|
||||
@@ -23,13 +23,19 @@ export const copyShowcaseData = (name, { dataDir, publicAssetsDir }) => {
|
||||
const q = [
|
||||
{
|
||||
fn: file.symlink,
|
||||
source: path.resolve(ASSETS_DIST_DIR, config.dir_name.background),
|
||||
target: path.resolve(publicAssetsDir, config.dir_name.background),
|
||||
source: path.resolve(
|
||||
ASSETS_DIST_DIR,
|
||||
config.module.assets.background
|
||||
),
|
||||
target: path.resolve(
|
||||
publicAssetsDir,
|
||||
config.module.assets.background
|
||||
),
|
||||
},
|
||||
{
|
||||
fn: file.symlink,
|
||||
source: path.resolve(ASSETS_DIST_DIR, config.dir_name.music),
|
||||
target: path.resolve(publicAssetsDir, config.dir_name.music),
|
||||
source: path.resolve(ASSETS_DIST_DIR, config.module.assets.music),
|
||||
target: path.resolve(publicAssetsDir, config.module.assets.music),
|
||||
},
|
||||
{
|
||||
fn: file.symlinkAll,
|
||||
@@ -45,7 +51,7 @@ export const copyShowcaseData = (name, { dataDir, publicAssetsDir }) => {
|
||||
filename: `${operators[name].fallback_name}.png`,
|
||||
source: path.resolve(
|
||||
ASSETS_DIST_DIR,
|
||||
config.dir_name.operator,
|
||||
config.module.operator.operator,
|
||||
name
|
||||
),
|
||||
target: path.resolve(publicAssetsDir),
|
||||
@@ -53,7 +59,7 @@ export const copyShowcaseData = (name, { dataDir, publicAssetsDir }) => {
|
||||
{
|
||||
fn: file.symlink,
|
||||
filename: `${operators[name].logo}.png`,
|
||||
source: path.resolve(ASSETS_DIST_DIR, config.dir_name.logos),
|
||||
source: path.resolve(ASSETS_DIST_DIR, config.module.operator.logos),
|
||||
target: path.resolve(publicAssetsDir),
|
||||
},
|
||||
{
|
||||
@@ -61,7 +67,7 @@ export const copyShowcaseData = (name, { dataDir, publicAssetsDir }) => {
|
||||
filename: config.module.charword_table.charword_table_json,
|
||||
source: path.resolve(
|
||||
ASSETS_DIST_DIR,
|
||||
config.dir_name.charword_table,
|
||||
config.module.assets.charword_table,
|
||||
name
|
||||
),
|
||||
target: path.resolve(publicAssetsDir),
|
||||
@@ -97,16 +103,16 @@ export const copyShowcaseData = (name, { dataDir, publicAssetsDir }) => {
|
||||
image_height: 2048,
|
||||
default_background: config.module.background.operator_bg_png,
|
||||
background_files: backgroundFiles,
|
||||
background_folder: config.dir_name.background,
|
||||
background_folder: config.module.assets.background,
|
||||
voice_default_region: defaultRegion,
|
||||
voice_folders: config.dir_name.voice,
|
||||
music_folder: config.dir_name.music,
|
||||
music_folder: config.module.assets.music,
|
||||
music_mapping: musicMapping.musicFileMapping,
|
||||
use_json: operators[name].use_json,
|
||||
}
|
||||
file.writeSync(
|
||||
JSON.stringify(buildConfig),
|
||||
path.join(path.resolve(dataDir), config.dir_name.config_json)
|
||||
path.join(path.resolve(dataDir), config.module.vite_helpers.config_json)
|
||||
)
|
||||
file.writeSync(
|
||||
env.generate([
|
||||
@@ -127,7 +133,7 @@ export const copyShowcaseData = (name, { dataDir, publicAssetsDir }) => {
|
||||
|
||||
export const copyProjectJSON = (name, { releaseDir }) => {
|
||||
file.cpSync(
|
||||
path.resolve(ASSETS_DIST_DIR, config.dir_name.project_json, name),
|
||||
path.resolve(ASSETS_DIST_DIR, config.module.assets.project_json, name),
|
||||
path.resolve(releaseDir),
|
||||
{
|
||||
dereference: true,
|
||||
@@ -159,7 +165,7 @@ export const copyDirectoryData = async ({ dataDir, publicDir }) => {
|
||||
file.readSync(
|
||||
path.join(
|
||||
ASSETS_DIST_DIR,
|
||||
config.dir_name.project_json,
|
||||
config.module.assets.project_json,
|
||||
cur.link,
|
||||
config.module.project_json.project_json
|
||||
)
|
||||
@@ -187,16 +193,16 @@ export const copyDirectoryData = async ({ dataDir, publicDir }) => {
|
||||
directory_folder: config.directory.assets_dir,
|
||||
default_background: config.module.background.operator_bg_png,
|
||||
background_files: backgroundFiles,
|
||||
background_folder: config.dir_name.background,
|
||||
background_folder: config.module.assets.background,
|
||||
available_operators: Object.keys(operators),
|
||||
error_files: config.directory.error,
|
||||
music_folder: config.dir_name.music,
|
||||
music_folder: config.module.assets.music,
|
||||
music_mapping: musicMapping.musicFileMapping,
|
||||
operators: operatorConfig,
|
||||
}
|
||||
file.writeSync(
|
||||
JSON.stringify(directoryConfig),
|
||||
path.join(dataDir, config.dir_name.config_json)
|
||||
path.join(dataDir, config.module.vite_helpers.config_json)
|
||||
)
|
||||
|
||||
file.writeSync(
|
||||
@@ -218,7 +224,7 @@ export const copyDirectoryData = async ({ dataDir, publicDir }) => {
|
||||
file.cpSync(
|
||||
path.join(
|
||||
sourceFolder,
|
||||
config.dir_name.operator,
|
||||
config.module.operator.operator,
|
||||
key,
|
||||
portraitName
|
||||
),
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import baseConfig from "@aklive2d/eslint-config";
|
||||
import baseConfig from '@aklive2d/eslint-config'
|
||||
/** @type {import('eslint').Config} */
|
||||
export default [
|
||||
...baseConfig,
|
||||
];
|
||||
export default [...baseConfig]
|
||||
|
||||
Reference in New Issue
Block a user