* update i18n

* update i18n
This commit is contained in:
Harvey Zack authored and GitHub committed 2023-08-26 13:22:19 +08:00
1 parent 9ba838aa52
commit e71a683dfd
38 files changed
+12194 -9690

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
import path from 'path';
import { glob } from 'glob';
import { Parcel } from '@parcel/core';
const basePath = 'packages/artplayer/src/i18n';
const entries = glob.sync(
path.join(basePath, '*.js'),
{
ignore: [
path.join(basePath, 'index.js'),
path.join(basePath, 'zh-cn.js'),
]
}
);
(async function build() {
const bundler = new Parcel({
entries: entries,
defaultConfig: '@parcel/config-default',
mode: 'production',
defaultTargetOptions: {
distDir: 'packages/artplayer/dist/i18n',
sourceMaps: false,
outputFormat: 'global',
isLibrary: true,
engines: {
browsers: ['last 1 Chrome version'],
},
},
env: {
NODE_ENV: 'production',
},
});
try {
const { bundleGraph, buildTime } = await bundler.run();
const bundles = bundleGraph.getBundles();
console.log(`✨ Built ${bundles.length} bundles in ${buildTime}ms`);
} catch (err) {
console.log(err.diagnostics);
}
})();