mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 03:57:09 +03:00
Mkdir with directory
This commit is contained in:
@@ -30,7 +30,8 @@ class BuildManifest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
const distManifestFile = path.resolve(__dirname, "../dist/manifest.json");
|
const distFolder = path.resolve(__dirname, "../dist/");
|
||||||
|
const distManifestFile = path.resolve(distFolder, "manifest.json");
|
||||||
|
|
||||||
// Add missing manifest elements
|
// Add missing manifest elements
|
||||||
if (this.options.browser.toLowerCase() === "firefox") {
|
if (this.options.browser.toLowerCase() === "firefox") {
|
||||||
@@ -42,7 +43,7 @@ class BuildManifest {
|
|||||||
let result = JSON.stringify(manifest);
|
let result = JSON.stringify(manifest);
|
||||||
if (this.options.pretty) result = JSON.stringify(manifest, null, 2);
|
if (this.options.pretty) result = JSON.stringify(manifest, null, 2);
|
||||||
|
|
||||||
fs.mkdirSync(distManifestFile, {recursive: true});
|
fs.mkdirSync(distFolder, {recursive: true});
|
||||||
fs.writeFileSync(distManifestFile, result);
|
fs.writeFileSync(distManifestFile, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user