mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 09:41:20 -08:00
fix(types): PKG-CHAPTER-04 preserve CJS ESM and legacy consumer contracts
This commit is contained in:
1 parent
48660c4e12
commit
bab80ff886
41 files changed
+1087
-119
No files matched your search
+3
-1
@@ -57,7 +57,9 @@ console.log(`✨ Built ${artplayerTSoutput}`);
|
||||
}
|
||||
|
||||
pluginFiles.sort()
|
||||
const allFiles = [...pluginFiles, 'artplayer.d.ts']
|
||||
const languageFile = 'artplayer-i18n.d.ts'
|
||||
fs.writeFileSync(path.join('docs/assets/ts', languageFile), `declare module 'artplayer/i18n/*' {\n const language: NonNullable<Artplayer.I18n['en']>\n export default language\n}\n`)
|
||||
const allFiles = [...pluginFiles, 'artplayer.d.ts', languageFile]
|
||||
const eslint = new ESLint({ fix: true, fixTypes: ['layout'] })
|
||||
const results = await eslint.lintFiles(allFiles.map(file => path.join('docs/assets/ts', file)))
|
||||
await ESLint.outputFixes(results)
|
||||
|
||||
Reference in new issue
Block a user