refactor(core): CORE-12 type template resources and verify bundled notices

This commit is contained in:
Harvey Zhao committed 2026-09-11 03:50:33 +08:00
1 parent b8039ad1f1
commit 9eb7c945ca
101 files changed
+7363 -664

No files matched your search

+3 -3
View File
@@ -11,9 +11,9 @@ const i18nSrcDir = path.join(basePath, 'src/i18n')
const distDir = path.join(basePath, 'dist/i18n')
const compiledPath = path.resolve('docs/compiled/i18n')
const entries = glob.sync('*.js', {
const entries = glob.sync('*.{js,ts}', {
cwd: i18nSrcDir,
ignore: ['index.js', 'zh-cn.js'],
ignore: ['index.{js,ts}', 'publish.{js,ts}', 'zh-cn.{js,ts}', '*.d.ts'],
}).map(f => path.join(i18nSrcDir, f))
async function buildI18n() {
@@ -23,7 +23,7 @@ async function buildI18n() {
fs.mkdirSync(distDir, { recursive: true })
for (const entry of entries) {
const baseName = path.basename(entry, '.js')
const baseName = path.basename(entry, path.extname(entry))
const globalName = `artplayerI18n${toPascalCase(baseName)}`
// Build UMD and ESM formats
+4 -1
View File
@@ -10,11 +10,14 @@ const projects = getProjects()
const compiledPath = path.resolve('docs/compiled')
function getBanner(name, version) {
const noticeFile = path.join(projects[name], 'THIRD_PARTY_NOTICES')
const notices = fs.existsSync(noticeFile) ? fs.readFileSync(noticeFile, 'utf8').trim() : ''
const noticeBlock = notices ? `\n *\n${notices.split(/\r?\n/).map(line => line.trimEnd() ? ` * ${line.trimEnd()}` : ' *').join('\n')}` : ''
return `/*!
* ${name}.js v${version}
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-${new Date().getFullYear()} Harvey Zhao
* Released under the MIT License.
* Released under the MIT License.${noticeBlock}
*/`
}