* Update artplayer.d.ts
This commit is contained in:
Harvey Zack authored and GitHub committed 2022-10-09 15:43:32 +08:00
1 parent e4196f53d9
commit 02953257f7
27 files changed
+1544 -1254

No files matched your search

+1 -1
View File
@@ -9,5 +9,5 @@ generateSW({
if (warnings.length > 0) {
console.warn('Warnings encountered while generating a service worker:', warnings.join('\n'));
}
console.log(`Generated a service worker, which will precache ${count} files, totaling ${size} bytes.`);
console.log(`✨ Generated a service worker, which will precache ${count} files, totaling ${size} bytes.`);
});
+16
View File
@@ -0,0 +1,16 @@
import fs from 'fs';
import path from 'path';
import glob from 'glob';
const reg = /^import.*;$/gim;
const types = glob.sync(path.join(process.cwd(), 'packages/artplayer/types/*'));
const output = path.join(path.join(process.cwd(), `docs/assets/ts/artplayer.d.ts`));
let code = '';
for (let index = 0; index < types.length; index++) {
const type = types[index];
code += String(fs.readFileSync(type)).replace(reg, '');
}
fs.writeFileSync(output, code.trim());
console.log(`✨ Built artplayer.d.ts`);