Added lite-mode build target
This commit is contained in:
parent
7a6c4e6a6e
commit
49a38eada0
5 changed files with 19 additions and 2 deletions
4
.env.production.lite
Normal file
4
.env.production.lite
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
NODE_ENV=production
|
||||
VUE_APP_PLATFORM=web
|
||||
VUE_APP_TARGET=web
|
||||
VUE_APP_LITEMODE=true
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
/dist-lite
|
||||
/app/dist
|
||||
/release-builds
|
||||
/installers/release-builds
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
"main": "./app/app.js",
|
||||
"scripts": {
|
||||
"build:web": "vue-cli-service build --mode production.web",
|
||||
"build:lite": "vue-cli-service build --mode production.lite",
|
||||
"build:app": "vue-cli-service build --mode production.app",
|
||||
"serve": "vue-cli-service serve --mode development.web",
|
||||
"start": "npm run build:app && electron app/app.js",
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
if (process.env.VUE_APP_LITEMODE == "true") {
|
||||
console.log("Built lite-mode");
|
||||
}
|
||||
// Query CSS dark theme preference
|
||||
var mql = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
// Check for system dark theme when mounted
|
||||
|
|
|
|||
|
|
@ -20,7 +20,15 @@ module.exports = {
|
|||
})
|
||||
);
|
||||
},
|
||||
outputDir:
|
||||
process.env.VUE_APP_TARGET == "electron-renderer" ? "./app/dist" : "./dist",
|
||||
outputDir: (function() {
|
||||
if (process.env.VUE_APP_TARGET == "electron-renderer") {
|
||||
return "./app/dist";
|
||||
} else if (process.env.VUE_APP_LITEMODE == "true") {
|
||||
return "./dist-lite";
|
||||
} else {
|
||||
return "./dist";
|
||||
}
|
||||
})(),
|
||||
|
||||
publicPath: ""
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue