Use flag for --no-install

This commit is contained in:
Albert Portnoy 2022-12-18 13:31:37 -06:00
parent cc81ceb838
commit 8187595f25
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -27,8 +27,8 @@ the theme when you save a file.
Building using the script above will automatically install the updated version of the theme in
Replugged. You can find the theme folder directories for your OS
[here](https://github.com/replugged-org/replugged#installing-plugins-and-themes).
If you don't want to install the updated version, set the `NO_INSTALL` environment variable with any
value: `NO_INSTALL=true pnpm run build`.
If you don't want to install the updated version, append the `--no-install` flag:
`pnpm run build --no-install`.
You can format the code by running `pnpm run lint:fix`. The repository includes VSCode settings to
automatically format on save.

View file

@ -9,7 +9,7 @@
"build": "tsx scripts/build.ts",
"watch": "tsx scripts/build.ts --watch",
"bundle": "tsx scripts/bundle.ts",
"build-and-bundle": "NO_INSTALL=true pnpm run build && pnpm run bundle",
"build-and-bundle": "pnpm run build --no-install && pnpm run bundle",
"lint": "prettier ./src ./scripts --check",
"lint:fix": "prettier ./src ./scripts --write"
},

View file

@ -49,7 +49,7 @@ export const CONFIG_PATH = (() => {
})();
async function install() {
if (!process.env.NO_INSTALL) {
if (!process.argv.includes("--no-install")) {
const dest = join(CONFIG_PATH, "themes", manifest.id);
if (existsSync(dest)) {
rmSync(dest, { recursive: true });