Skip to content

Commit f571830

Browse files
🚀 build: add cross-env for handling environment variables
- Add `cross-env` package to handle environment variables consistently - Update `dev`, `build`, `build:mac`, `build:windows`, and `build:linux` scripts to use `cross-env`
1 parent 3168e06 commit f571830

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎apps/desktop/package.json‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
"author": "Screenlink",
66
"description": "Screenlink Desktop",
77
"scripts": {
8-
"dev": "NODE_ENV=development vite",
9-
"build": "tsc && vite build && electron-builder -mwl",
10-
"build:mac": "tsc && vite build && electron-builder -m",
8+
"dev": "cross-env NODE_ENV=development vite",
9+
"build": "cross-env NODE_ENV=production vite build && electron-builder -mwl",
10+
"build:mac": "cross-env NODE_ENV=production vite build && electron-builder -m",
11+
"build:windows": "cross-env NODE_ENV=production vite build && electron-builder -w",
12+
"build:linux": "cross-env NODE_ENV=production vite build && electron-builder -l",
1113
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
1214
"preview": "vite preview"
1315
},
@@ -60,6 +62,7 @@
6062
"@typescript-eslint/parser": "^6.6.0",
6163
"@vitejs/plugin-react": "^4.0.4",
6264
"autoprefixer": "^10.4.16",
65+
"cross-env": "^7.0.3",
6366
"electron": "^26.1.0",
6467
"electron-builder": "^24.6.4",
6568
"eslint": "^8.48.0",

‎apps/desktop/yarn.lock‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,6 +2107,13 @@ crc@^3.8.0:
21072107
dependencies:
21082108
buffer "^5.1.0"
21092109

2110+
cross-env@^7.0.3:
2111+
version "7.0.3"
2112+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
2113+
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
2114+
dependencies:
2115+
cross-spawn "^7.0.1"
2116+
21102117
cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
21112118
version "7.0.3"
21122119
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"

0 commit comments

Comments
 (0)