fix: fix packllqqntengine script

This commit is contained in:
Il Harper 2024-09-07 16:08:25 +08:00
parent 519145b5a8
commit 087f9f1dbc
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC

View File

@ -4,7 +4,10 @@ import { join, resolve } from 'node:path'
void Promise.all( void Promise.all(
['engine-chronocat-api', 'engine-chronocat-event', 'engine-media'].map( ['engine-chronocat-api', 'engine-chronocat-event', 'engine-media'].map(
async (x) => { async (x) => {
const upper = `${x[0]!.toUpperCase()}${x.slice(1, 7)}${x[7]!.toUpperCase()}${x.slice(8, 17)}${x[17]!.toUpperCase()}${x.slice(18)}` const upper = x
.split('-')
.map((y) => y[0]!.toUpperCase() + y.slice(1))
.join('-')
const distName = `LiteLoaderQQNT-Plugin-Chronocat-${upper}` const distName = `LiteLoaderQQNT-Plugin-Chronocat-${upper}`
const corePath = resolve(__dirname, `../packages/${x}/lib/index.js`) const corePath = resolve(__dirname, `../packages/${x}/lib/index.js`)
@ -38,7 +41,7 @@ void Promise.all(
const manifest = { const manifest = {
manifest_version: 4, manifest_version: 4,
type: 'extension', type: 'extension',
name: `Chronocat Engine: ${x[7]!.toUpperCase()}${x.slice(8, 17)}${x[17]!.toUpperCase()}${x.slice(18)}`, name: `Chronocat Engine: ${upper.slice(7)}`,
slug: `chronocat-${x}`, slug: `chronocat-${x}`,
description, description,
version, version,