diff --git a/README.md b/README.md index 9b82596..cafa605 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index 901255c..d37ed66 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/scripts/build.ts b/scripts/build.ts index 5096b2e..8c475d8 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -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 });