LP1850955 Angular build targets modernized
authorBill Erickson <berickxx@gmail.com>
Fri, 1 Nov 2019 16:18:00 +0000 (12:18 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 27 Nov 2019 16:36:26 +0000 (11:36 -0500)
Apply a specific set of browsers to guide the Angular / Typescript
compilers toward a more modern set of default browsers.  This reduces
the amount of compilation and browser files required.

Bump the ES version used by Typescript from ES5 to ES6.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Boyer <JBoyer@eoli.info>
Open-ILS/src/eg2/package.json
Open-ILS/src/eg2/src/tsconfig.app.json
Open-ILS/src/eg2/tsconfig.json

index 2bb3143..1c49d66 100644 (file)
     "build-cs-CZ": "ng build --configuration=production-cs-CZ --output-path ../../web/eg2/cs-CZ --deploy-url /eg2/cs-CZ/ --base-href /eg2/cs-CZ; sed -i s/IDL2js\\\"/IDL2js?locale=cs-CZ\\\"/g ../../web/eg2/cs-CZ/index.html; sed -i s/lang=\\\"en\\\"/lang=\\\"cs\\\"/g ../../web/eg2/cs-CZ/index.html"
   },
   "private": true,
+  "browserslist": [
+    "last 3 chrome version",
+    "last 3 firefox version",
+    "last 1 safari version"
+  ],
   "dependencies": {
     "@angular/animations": "^8.2.11",
     "@angular/common": "^8.2.11",
index 39ba8db..190fd30 100644 (file)
@@ -2,8 +2,6 @@
   "extends": "../tsconfig.json",
   "compilerOptions": {
     "outDir": "../out-tsc/app",
-    "baseUrl": "./",
-    "module": "es2015",
     "types": []
   },
   "exclude": [
index 2e74d31..e50f1d4 100644 (file)
@@ -4,10 +4,11 @@
     "outDir": "./dist/out-tsc",
     "sourceMap": true,
     "declaration": false,
+    "module": "es6",
     "moduleResolution": "node",
     "emitDecoratorMetadata": true,
     "experimentalDecorators": true,
-    "target": "es2015",
+    "target": "es6",
     "baseUrl": "src",
     "paths": {
         "@eg/*": ["app/*"],
@@ -17,9 +18,8 @@
       "node_modules/@types"
     ],
     "lib": [
-      "es2017",
-      "dom",
-      "es2018.promise"
+      "es2018",
+      "dom"
     ]
   }
 }