diff --git a/README.md b/README.md index 30e17ca8ab9fc2f4368b8dfbbc8c03441229ac05..896228611936c2a1df62e958f77bca365bda9699 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index b340456ff3de76ad4a843c014ca966f1c5bdcd71..184b04cc18295e36017007841f50b88efe58c429 100644 --- a/package.json +++ b/package.json @@ -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 ." } diff --git a/rollup.config.js b/rollup.config.js index ad725069b104e2dfad92e2379f97f755ae2c3832..db470c6b5d7c06de5f3f4806ec2758b07a67de11 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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);