-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Robot-Inventor/hide-view-count
- Loading branch information
Showing
5 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import fs from "fs"; | ||
import manifestV2 from "../src/manifest/v2.json"; | ||
import manifestV3 from "../src/manifest/v3.json"; | ||
import packageJson from "../package.json"; | ||
import fs from "fs"; | ||
|
||
const JSON_INDENT = 4; | ||
|
||
manifestV2.version = packageJson.version; | ||
manifestV3.version = packageJson.version; | ||
|
||
const manifestV2Text = JSON.stringify(manifestV2, null, 4); | ||
const manifestV3Text = JSON.stringify(manifestV3, null, 4); | ||
const manifestV2Text = JSON.stringify(manifestV2, null, JSON_INDENT); | ||
const manifestV3Text = JSON.stringify(manifestV3, null, JSON_INDENT); | ||
|
||
fs.writeFileSync("./dist/firefox/manifest.json", manifestV2Text); | ||
fs.writeFileSync("./dist/chrome/manifest.json", manifestV3Text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import { execSync } from "child_process"; | ||
|
||
// eslint-disable-next-line no-console | ||
console.log("Building..."); | ||
execSync("npm run build"); | ||
|
||
// eslint-disable-next-line no-console | ||
console.log("Packaging for Chrome..."); | ||
execSync( | ||
`npx web-ext build --source-dir "./dist/chrome/" --artifacts-dir "./web-ext-artifacts/manifestV3" --filename "{name}-{version}-manifestV3.zip"` | ||
); | ||
|
||
// eslint-disable-next-line no-console | ||
console.log("Packaging for Firefox..."); | ||
execSync( | ||
`npx web-ext build --source-dir "./dist/firefox/" --artifacts-dir "./web-ext-artifacts/manifestV2" --filename "{name}-{version}-manifestV2.zip"` | ||
); | ||
// eslint-disable-next-line no-console | ||
console.log("Done."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
}, | ||
"include": [ | ||
"./src/**/*.ts", | ||
"./rspack.config.ts" | ||
"./rspack.config.ts", | ||
"./script/**/*.ts" | ||
] | ||
} |