Add Steam build commands

This commit is contained in:
Andrei Andreev 2023-02-16 20:17:23 +01:00
parent c33e34d50d
commit f645068afb
5 changed files with 11 additions and 4 deletions

2
.env.steam-development Normal file
View File

@ -0,0 +1,2 @@
VUE_APP_DEV=true
VUE_APP_STEAM=true

2
.env.steam-release Normal file
View File

@ -0,0 +1,2 @@
VUE_APP_DEV=false
VUE_APP_STEAM=true

View File

@ -14,4 +14,4 @@ const commit = {
const json = JSON.stringify(commit); const json = JSON.stringify(commit);
fs.writeFileSync(path.resolve(__dirname, "../../AppFiles/commit.json"), json); fs.writeFileSync(path.resolve(__dirname, "../dist/commit.json"), json);

View File

@ -2,9 +2,10 @@
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "node build/check-npm.js && vue-cli-service serve", "serve": "node build/check-npm.js && vue-cli-service serve",
"build": "node build/pre-build.js && vue-cli-service build --dest ../AppFiles && node build/post-build.js",
"build:master": "node build/pre-build.js && vue-cli-service build --mode master && node build/post-build.js", "build:master": "node build/pre-build.js && vue-cli-service build --mode master && node build/post-build.js",
"build:release": "node build/pre-build.js && vue-cli-service build && node build/post-build.js", "build:release": "node build/pre-build.js && vue-cli-service build && node build/post-build.js",
"build:steam-development": "node build/pre-build.js && vue-cli-service build --mode steam-development",
"build:steam-release": "node build/pre-build.js && vue-cli-service build --mode steam-release",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {

View File

@ -2,12 +2,14 @@
* @type {import('@vue/cli-service').ProjectOptions} * @type {import('@vue/cli-service').ProjectOptions}
*/ */
const isDev = process.env.VUE_APP_DEV === "true"; const DEV = process.env.VUE_APP_DEV === "true";
const STEAM = process.env.VUE_APP_STEAM === "true";
module.exports = { module.exports = {
publicPath: "./", publicPath: "./",
lintOnSave: false, lintOnSave: false,
outputDir: STEAM ? "../AppFiles" : "dist",
configureWebpack: { configureWebpack: {
devtool: isDev ? "eval-source-map" : "source-map", devtool: DEV ? "eval-source-map" : "source-map",
} }
}; };