Skip to content
Snippets Groups Projects
Commit c2463a9f authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Add a new watch-full mode including babel/terser etc

watch should be faster now, watch-full is the same as a production build, but slow
parent 11308843
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,10 @@ git submodule update --init
npm install
# constantly build dist/bundle.js and run a local web-server on port 8001
npm run watch-local
npm run watch
# same as watch, but with babel, terser, etc active -> very slow
npm run watch-full
# run tests
npm test
......
......@@ -68,9 +68,9 @@
"build-demo": "rollup -c --environment BUILD:demo",
"build-test": "rollup -c --environment BUILD:test",
"i18next": "i18next-scanner",
"watch": "npm run watch-local",
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"watch": "rollup -c --watch",
"watch-local": "npm run watch",
"watch-full": "rollup -c --watch --environment WATCH_FULL",
"test": "npm run build-test && karma start --singleRun",
"lint": "eslint ."
}
......
......@@ -29,6 +29,7 @@ const USE_HTTPS = false;
const pkg = require('./package.json');
const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local';
const watch = process.env.ROLLUP_WATCH === 'true';
const watchFull = process.env.WATCH_FULL !== undefined;
console.log("build: " + build);
let basePath = '';
let entryPointURL = '';
......@@ -37,9 +38,9 @@ let keyCloakBaseURL = '';
let keyCloakClientId = '';
let pdfAsQualifiedlySigningServer = '';
let matomoSiteId = 131;
let useTerser = true;
let useBabel = true;
let checkLicenses = !watch;
let useTerser = !watch || watchFull;
let useBabel = !watch || watchFull;
let checkLicenses = !watch || watchFull;
switch (build) {
case 'local':
......@@ -49,7 +50,6 @@ switch (build) {
keyCloakBaseURL = 'https://' + keyCloakServer + '/auth';
keyCloakClientId = 'auth-dev-mw-frontend-local';
pdfAsQualifiedlySigningServer = 'sig-dev.tugraz.at';
useTerser = false;
break;
case 'development':
basePath = '/apps/signature/';
......@@ -83,7 +83,6 @@ switch (build) {
keyCloakBaseURL = '';
keyCloakClientId = '';
pdfAsQualifiedlySigningServer = '';
useTerser = false;
break;
default:
console.error('Unknown build environment: ' + build);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment