mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
chore: address restructure PR review feedback (#6423)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
dist/
|
||||
dist-portal/
|
||||
editor/dist/
|
||||
# Tauri/Cargo build output (binary assets named *.js etc. confuse Prettier)
|
||||
editor/src-tauri/target/
|
||||
# Tauri/Cargo build output (binary assets named *.js etc. confuse Prettier).
|
||||
# Match nested target/ dirs too — provisioner/ and thumbnail-handler/ each
|
||||
# have their own Cargo workspace under src-tauri/.
|
||||
editor/src-tauri/**/target/
|
||||
editor/src-tauri/gen/
|
||||
node_modules/
|
||||
editor/public/vendor/
|
||||
|
||||
@@ -6,9 +6,18 @@
|
||||
* Vite automatically layers these `.local` files on top of the committed ones.
|
||||
*
|
||||
* Usage:
|
||||
* tsx scripts/setup-env.ts # ensures .env.local
|
||||
* tsx scripts/setup-env.ts --desktop # also ensures .env.desktop.local
|
||||
* tsx scripts/setup-env.ts --saas # also ensures .env.saas.local
|
||||
* tsx scripts/setup-env.mts # ensures .env.local
|
||||
* tsx scripts/setup-env.mts --desktop # also ensures .env.desktop.local
|
||||
* tsx scripts/setup-env.mts --saas # also ensures .env.saas.local
|
||||
*
|
||||
* Why .mts (and not .ts)?
|
||||
* This script needs `import.meta.url` to resolve paths relative to itself,
|
||||
* because Task invokes it from the workspace root (frontend/) but the .env
|
||||
* files live one level deeper at frontend/editor/. `import.meta` is only
|
||||
* valid in ESM output; `editor/scripts/tsconfig.json` extends the editor
|
||||
* tsconfig which uses `module: node16`, treating plain .ts as CommonJS
|
||||
* (TS1470 error on `import.meta`). The .mts extension explicitly marks
|
||||
* the file as ESM, which tsx already runs at runtime anyway.
|
||||
*/
|
||||
|
||||
import { existsSync, writeFileSync } from "fs";
|
||||
@@ -17,8 +26,6 @@ import { fileURLToPath } from "url";
|
||||
|
||||
// .env files live next to the editor's vite.config.ts (frontend/editor/).
|
||||
// Resolve relative to this script regardless of where the build was invoked.
|
||||
// `import.meta.dirname` would be tidier but isn't available under tsx's CJS
|
||||
// transpilation today, so go via fileURLToPath for portability.
|
||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
const root = resolve(scriptDir, "..");
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
@@ -7,7 +7,8 @@ import tseslint from "typescript-eslint";
|
||||
|
||||
const srcGlobs = ["editor/src/**/*.{js,mjs,jsx,ts,tsx}"];
|
||||
const nodeGlobs = [
|
||||
"editor/scripts/**/*.{js,ts,mjs}",
|
||||
"scripts/**/*.{js,ts,mjs,mts}",
|
||||
"editor/scripts/**/*.{js,ts,mjs,mts}",
|
||||
"editor/*.config.{js,ts,mjs}",
|
||||
"*.config.{js,ts,mjs}",
|
||||
];
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
"web-vitals": "^5.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"update:minor": "node editor/scripts/update-minor.js",
|
||||
"update:minor": "node scripts/update-minor.js",
|
||||
"update:major": "npx npm-check-updates -u && npm install",
|
||||
"update:interactive": "npx npm-check-updates -i",
|
||||
"update:minor-strict": "npx npm-check-updates -u --target minor && npm install"
|
||||
|
||||
Reference in New Issue
Block a user