Move env variables to a separate file, add STEAM env variable

This commit is contained in:
Andrei Andreev 2023-02-14 20:21:51 +01:00
parent d7bdc18a7d
commit 7ec351dd2b
8 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
import { sha512_256 } from "js-sha512";
import { DEV } from "../devtools";
import { DEV } from "@/env";
import FullScreenAnimationHandler from "../full-screen-animation-handler";

View File

@ -1,7 +1,7 @@
import VTooltip from "v-tooltip";
import VueGtag from "vue-gtag";
import { DEV } from "../devtools";
import { DEV } from "@/env";
import { useLongPress, useRepeatingClick } from "./longpress";
import { notify } from "./notify";

View File

@ -3,8 +3,6 @@ import { sha512_256 } from "js-sha512";
import { DC } from "./constants";
import FullScreenAnimationHandler from "./full-screen-animation-handler";
export const DEV = process.env.VUE_APP_DEV === "true";
/* eslint-disable no-console */
// Disabling no-console here seems
// reasonable, since these are the devtools after all

View File

@ -1,4 +1,4 @@
import { DEV } from "../devtools";
import { DEV } from "@/env";
import { deepmergeAll } from "@/utility/deepmerge";
import { GameStorage } from "./storage";

View File

@ -1,6 +1,6 @@
import * as ADNotations from "@antimatter-dimensions/notations";
import { DEV } from "../devtools";
import { DEV } from "@/env";
import { deepmergeAll } from "@/utility/deepmerge";

View File

@ -3,7 +3,7 @@ import TWEEN from "tween.js";
import { DC } from "./core/constants";
import { deepmergeAll } from "@/utility/deepmerge";
import { playFabLogin } from "./core/playfab";
import { DEV } from "./core/devtools";
import { DEV } from "@/env";
import { SpeedrunMilestones } from "./core/speedrun";
import { supportedBrowsers } from "./supported-browsers";

2
src/env.js Normal file
View File

@ -0,0 +1,2 @@
export const DEV = process.env.VUE_APP_DEV === "true";
export const STEAM = process.env.VUE_APP_STEAM === "true";

View File

@ -1,7 +1,7 @@
import "drag-drop-touch";
import "./shims";
import "./merge-globals";
import { DEV } from "../javascripts/core/devtools";
import { DEV } from "@/env";
import { browserCheck, init } from "../javascripts/game";
import { watchLatestCommit } from "@/commit-watcher";