chore: add stage environment

This commit is contained in:
Johannes Millan 2020-09-18 15:55:28 +02:00
parent 2e96c0fa52
commit ad53014d4d
3 changed files with 64 additions and 9 deletions

View file

@ -67,6 +67,55 @@
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true
},
"productionWeb": {
"baseHref": "",
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true
},
"stage": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true
}
}
},

View file

@ -22,12 +22,12 @@
"start": "yarn electron:build && cross-env NODE_ENV=DEV electron .",
"startFrontend": "ng serve",
"serveProd": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng serve --prod",
"buildFrontend": "yarn preCheck && node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --aot --prod",
"buildFrontendElectron": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --aot --prod --base-href=''",
"buildFrontendElectron:preCheck": "yarn preCheck && yarn buildFrontendElectron",
"buildFrontendElectron:watch": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --aot --prod --base-href='' --watch",
"buildAllElectron": "yarn buildFrontendElectron:preCheck && yarn electron:build",
"buildAllElectronNoTests": "yarn lint && yarn buildFrontendElectron && yarn electron:build",
"buildFrontend": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --aot --prod",
"buildFrontend:stage": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --aot --prod --configuration stage",
"buildFrontend:watch": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --aot --prod --watch",
"buildAllElectron": "yarn preCheck && yarn buildFrontend && yarn electron:build",
"buildAllElectron:stage": "yarn preCheck && yarn buildFrontend:stage && yarn electron:build",
"buildAllElectron:noTests": "yarn lint && yarn buildFrontend && yarn electron:build",
"buildApp": "yarn preCheck && yarn buildAllElectron && yarn electron-builder",
"test": "ng test --watch=false",
"test:watch": "ng test --browsers ChromeHeadless",
@ -41,13 +41,13 @@
"electron:watch": "tsc -p electron/tsconfig.electron.json --watch",
"electronBuilderOnly": "electron-builder",
"pack": "electron-builder --dir",
"localInstall": "sudo echo 'Starting local install' && rm -Rf ./dist/ && rm -Rf ./app-builds/ && yarn buildAllElectron && electron-builder --linux deb && sudo dpkg -i app-builds/superProductivity*.deb",
"localInstall:quick": "sudo echo 'Starting local install' && rm -Rf ./dist/ && rm -Rf ./app-builds/ && yarn buildFrontendElectron && yarn electron:build && electron-builder --linux deb && sudo dpkg -i app-builds/superProductivity*.deb",
"localInstall": "sudo echo 'Starting local install' && rm -Rf ./dist/ && rm -Rf ./app-builds/ && yarn buildAllElectron:stage && electron-builder --linux deb && sudo dpkg -i app-builds/superProductivity*.deb",
"localInstall:quick": "sudo echo 'Starting local install' && rm -Rf ./dist/ && rm -Rf ./app-builds/ && yarn buildFrontend:stage && yarn electron:build && electron-builder --linux deb && sudo dpkg -i app-builds/superProductivity*.deb",
"localInstall:mac": "sudo echo 'Starting local install. Don`t forget APPLEID & APPLEIDPASS !!' && yarn buildAllElectron && sudo echo '' && electron-builder && sudo cp -rf app-builds/mac/superProductivity.app/ /Applications/superProductivity.app",
"dist": "yarn buildAllElectron && electron-builder",
"dist:only": "electron-builder",
"dist:linuxAndWin": "yarn buildAllElectron && electron-builder --linux --win",
"dist:win": "yarn buildAllElectronNoTests && electron-builder --win",
"dist:win": "yarn buildAllElectron:noTests && electron-builder --win",
"dist:win:only": "electron-builder --win",
"dist:win:appx": "yarn buildAllElectron && electron-builder --win --config=build/electron-builder.appx.yaml",
"dist:win:store": "git stash && git pull && yarn && git stash pop && yarn dist:win",

View file

@ -0,0 +1,6 @@
import { version } from '../../package.json';
export const environment = {
stage: true,
version,
};