|
|
@@ -42,15 +42,13 @@ async function jsProd() {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Versioning
|
|
|
- *
|
|
|
- * The version of extension is composed of `version` and `beta` fields in `package.json`.
|
|
|
- *
|
|
|
- * Note: prerelease is ignored and not recommended since both Chrome and Firefox do not support semver
|
|
|
+ * manifest is already handled in ListBackgroundScriptsPlugin
|
|
|
*
|
|
|
+ * This task is only used to tweak dist/manifest.json without rebuilding
|
|
|
*/
|
|
|
async function manifest() {
|
|
|
- const data = await buildManifest();
|
|
|
+ const base = JSON.parse(await fs.readFile(`${DIST}/manifest.json`, 'utf8'));
|
|
|
+ const data = await buildManifest(base);
|
|
|
await fs.mkdir(DIST).catch(() => {});
|
|
|
await fs.writeFile(`${DIST}/manifest.json`, JSON.stringify(data), 'utf8');
|
|
|
}
|
|
|
@@ -168,8 +166,8 @@ const pack = gulp.parallel(createIcons, copyI18n, copyZip);
|
|
|
exports.clean = clean;
|
|
|
exports.manifest = manifest;
|
|
|
// Making sure `manifest` finishes before its `version` is used by webpack.conf.js
|
|
|
-exports.dev = gulp.series(manifest, gulp.parallel(pack, jsDev), watch);
|
|
|
-exports.build = gulp.series(clean, manifest, gulp.parallel(pack, jsProd));
|
|
|
+exports.dev = gulp.series(gulp.parallel(pack, jsDev), watch);
|
|
|
+exports.build = gulp.series(clean, gulp.parallel(pack, jsProd));
|
|
|
exports.i18n = updateI18n;
|
|
|
exports.check = checkI18n;
|
|
|
exports.copyI18n = copyI18n;
|