From 087f9f1dbc877f026246d6a6ab1f8a21e925ace8 Mon Sep 17 00:00:00 2001 From: Il Harper Date: Sat, 7 Sep 2024 16:08:25 +0800 Subject: [PATCH] fix: fix packllqqntengine script --- scripts/packllqqntengine.cts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/packllqqntengine.cts b/scripts/packllqqntengine.cts index 1c01612..3a32618 100644 --- a/scripts/packllqqntengine.cts +++ b/scripts/packllqqntengine.cts @@ -4,7 +4,10 @@ import { join, resolve } from 'node:path' void Promise.all( ['engine-chronocat-api', 'engine-chronocat-event', 'engine-media'].map( 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 corePath = resolve(__dirname, `../packages/${x}/lib/index.js`) @@ -38,7 +41,7 @@ void Promise.all( const manifest = { manifest_version: 4, 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}`, description, version,