feat: add danmuku plugin documentation and i18n setup guide

- Created a new documentation file for the danmuku plugin with code examples.
- Added comprehensive i18n setup instructions, including default language settings, language imports, and examples for adding and modifying languages.
- Updated the structure of the i18n documentation for clarity and usability.
This commit is contained in:
Harvey Zack committed 2025-08-17 23:51:45 +08:00
1 parent 40b66b4b68
commit e8b01c357f
86 files changed
+72 -227

No files matched your search

+1 -22
View File
@@ -55,7 +55,7 @@ async function build(name, targetName, clean = false) {
esm: {
context: 'browser',
distDir,
sourceMap: true,
sourceMap: false,
outputFormat: 'esmodule',
isLibrary: true,
engines: {
@@ -105,27 +105,6 @@ async function build(name, targetName, clean = false) {
const size = fs.statSync(newFilePath).size / 1024
await cpy(newFilePath, compiledPath)
if (targetName === 'esm') {
const jsFile = newFilePath
const oldMapName = 'index.js.map'
const newMapName = `${names.esm}.map`
const oldMapPath = path.join(distDir, oldMapName)
const newMapPath = path.join(distDir, newMapName)
if (fs.existsSync(oldMapPath)) {
fs.renameSync(oldMapPath, newMapPath)
}
let jsContent = fs.readFileSync(jsFile, 'utf8')
jsContent = jsContent.replace(
/\/\/# sourceMappingURL=.*\.js\.map/,
`\n//# sourceMappingURL=${path.basename(newMapName)}`,
)
fs.writeFileSync(jsFile, jsContent)
await cpy(newMapPath, compiledPath)
await cpy(jsFile, compiledPath)
}
console.log(
`✨ Built@${targetName} ${name}@${version}`,
`Bundles@${bundles.length}`,