Bläddra i källkod

ref: change preview command

Sv443 7 månader sedan
förälder
incheckning
bf86ef3fe1
3 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      contributing.md
  2. 1 1
      package.json
  3. 1 1
      src/tools/serve.ts

+ 1 - 1
contributing.md

@@ -119,7 +119,7 @@ To edit an existing translation, please follow these steps:
     Sets `--config-mode=production` and `--config-branch=main` and `--config-assetSource=github`
   - `pnpm run build-dev` - Builds a preview version, targeting the develop branch and the public asset source so no local dev environment is needed.  
     Sets `--config-mode=development`, `--config-branch=develop` and `--config-assetSource=github`
-  - `pnpm run preview` - Same as `pnpm run build-dev but also starts the dev server for a few seconds so the extension that's waiting for file changes can update the script and assets
+  - `pnpm run preview` - Same as `pnpm run build-prod`, but sets `--config-host=github` and `--config-assetSource=local`, then starts the dev server for a few seconds so the extension that's waiting for file changes can update the script and assets
 - **`pnpm run lint`**  
   Builds the userscript with the TypeScript compiler and lints it with ESLint. Doesn't verify the functionality of the script, only checks for syntax and TypeScript errors!
 - **`pnpm run storybook`**  

+ 1 - 1
package.json

@@ -13,7 +13,7 @@
     "build": "rollup -c",
     "build-private-dev": "rollup -c --config-mode development --config-host github --config-branch develop --config-assetSource=local",
     "build-dev": "rollup -c --config-mode development --config-host github --config-branch develop",
-    "preview": "pnpm run build-prod-gh --config-assetSource=local && pnpm run serve --auto-exit=5",
+    "preview": "pnpm run build-prod-gh --config-assetSource=local && pnpm run serve --auto-exit-time=6",
     "build-prod": "pnpm run build-prod-gh && pnpm run build-prod-gf && pnpm run build-prod-oujs",
     "build-prod-base": "rollup -c --config-mode production --config-branch main",
     "build-prod-gh": "pnpm run build-prod-base --config-host github",

+ 1 - 1
src/tools/serve.ts

@@ -11,7 +11,7 @@ const devServerPort = isNaN(envPort) || envPort === 0 ? 8710 : envPort;
 /** Whether to log requests to the console */
 const enableLogging = false;
 
-const autoExitRaw = process.argv.find(arg => arg.startsWith("--auto-exit="))?.split("=")[1];
+const autoExitRaw = process.argv.find(arg => arg.startsWith("--auto-exit-time="))?.split("=")[1];
 /** Time in milliseconds after which the process should automatically exit */
 const autoExitTime: number | undefined = !isNaN(Number(autoExitRaw)) ? Number(autoExitRaw) * 1000 : undefined;