diff options
author | 2018-02-20 13:23:10 +0100 | |
---|---|---|
committer | 2018-02-20 13:23:10 +0100 | |
commit | fc76e14df444d1dcb1b3e254125a6f1f3261e192 (patch) | |
tree | 552e37adbca0bedefaf70a568e48b5322119f43c | |
parent | [WIP] incorporate electron-react-titlebar (diff) | |
download | ferdium-app-fc76e14df444d1dcb1b3e254125a6f1f3261e192.tar.gz ferdium-app-fc76e14df444d1dcb1b3e254125a6f1f3261e192.tar.zst ferdium-app-fc76e14df444d1dcb1b3e254125a6f1f3261e192.zip |
choose platform with environment variable `FRANZ_PLATFORM`
-rw-r--r-- | .vscode/launch.json | 3 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/index.html | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json index a8300f84f..9bd373a4d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json | |||
@@ -9,7 +9,8 @@ | |||
9 | "program": "${workspaceFolder}/build/index.js", | 9 | "program": "${workspaceFolder}/build/index.js", |
10 | "protocol": "inspector", | 10 | "protocol": "inspector", |
11 | "env": { | 11 | "env": { |
12 | "NODE_ENV": "development" | 12 | "NODE_ENV": "development", |
13 | "FRANZ_PLATFORM": "win32" | ||
13 | } | 14 | } |
14 | }, | 15 | }, |
15 | { | 16 | { |
diff --git a/package.json b/package.json index 78f7a3291..60e45f7f6 100644 --- a/package.json +++ b/package.json | |||
@@ -13,7 +13,7 @@ | |||
13 | "start": "electron ./build", | 13 | "start": "electron ./build", |
14 | "start:local": "cross-env LOCAL_API=1 yarn start", | 14 | "start:local": "cross-env LOCAL_API=1 yarn start", |
15 | "start:live": "cross-env LIVE_API=1 yarn start", | 15 | "start:live": "cross-env LIVE_API=1 yarn start", |
16 | "dev": "cross-env NODE_ENV=development gulp dev", | 16 | "dev": "cross-env NODE_ENV=development FRANZ_PLATFORM=win32 gulp dev", |
17 | "lint": "eslint src", | 17 | "lint": "eslint src", |
18 | "sign": "gulp sign", | 18 | "sign": "gulp sign", |
19 | "prebuild": "gulp build", | 19 | "prebuild": "gulp build", |
diff --git a/src/index.html b/src/index.html index 9e5acd705..bb10d2eaf 100644 --- a/src/index.html +++ b/src/index.html | |||
@@ -11,7 +11,7 @@ | |||
11 | <div class="dev-warning">DEV MODE</div> | 11 | <div class="dev-warning">DEV MODE</div> |
12 | <div id="root"></div> | 12 | <div id="root"></div> |
13 | <script> | 13 | <script> |
14 | document.querySelector('body').classList.add(process.platform); | 14 | document.querySelector('body').classList.add(process.env.FRANZ_PLATFORM ? process.env.FRANZ_PLATFORM : process.platform); |
15 | 15 | ||
16 | const { isDevMode } = require('./environment'); | 16 | const { isDevMode } = require('./environment'); |
17 | if (isDevMode) { | 17 | if (isDevMode) { |