mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-10 04:36:15 -08:00
refactor: update global name handling in build scripts
- Replaced `toPascalCase` with `getGlobalName` in build and dev scripts to standardize global variable naming for packages. - Added `toCamelCase` and `getGlobalName` utility functions in `utils.js` to handle naming conventions based on package type.
This commit is contained in:
1 parent
1e60637b74
commit
1dc8e9a4ff
85 files changed
+554
-825
No files matched your search
+2
-2
@@ -4,7 +4,7 @@ import prompts from 'prompts'
|
||||
import servor from 'servor'
|
||||
import openBrowser from 'servor/utils/openBrowser.js'
|
||||
import { build as viteBuild } from 'vite'
|
||||
import { getProjects, getViteBuildConfig, toPascalCase } from './utils.js'
|
||||
import { getGlobalName, getProjects, getViteBuildConfig } from './utils.js'
|
||||
|
||||
const projects = getProjects()
|
||||
|
||||
@@ -29,7 +29,7 @@ async function develop(name) {
|
||||
const config = getViteBuildConfig({
|
||||
entry: entryFile,
|
||||
outDir: uncompiledPath,
|
||||
name: toPascalCase(name),
|
||||
name: getGlobalName(name),
|
||||
format: 'iife',
|
||||
fileName: 'index.js',
|
||||
minify: false,
|
||||
|
||||
Reference in new issue
Block a user