From 4a61f0ac04c73511fc95e0cba55d3196f592f1d7 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Wed, 5 May 2021 09:46:14 +0200 Subject: [PATCH] Cleanup tsconfig (#954) * Cleanup tsconfig * Removed dummy module --- package-lock.json | 6 ++++++ package.json | 1 + src/app/app.component.ts | 2 +- src/app/dummy.module.ts | 12 ------------ src/app/tools/import.component.ts | 2 +- src/services/webPlatformUtils.service.ts | 2 +- tsconfig.json | 25 ++---------------------- 7 files changed, 12 insertions(+), 38 deletions(-) delete mode 100644 src/app/dummy.module.ts diff --git a/package-lock.json b/package-lock.json index 85cbedf3f1..39ff5caf28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -573,6 +573,12 @@ "integrity": "sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==", "dev": true }, + "@types/duo_web_sdk": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@types/duo_web_sdk/-/duo_web_sdk-2.7.0.tgz", + "integrity": "sha512-E8cRtor4+hYNVYZ/hk+0WoZtiGOWvxhX3UsJtNtVlDIk2d8dnbYX6wdhqBTwixPpw7ea3I8IS3BAK81GRXyLUQ==", + "dev": true + }, "@types/glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", diff --git a/package.json b/package.json index 7eb8ddca97..cf84cdde1f 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "devDependencies": { "@angular/compiler-cli": "^11.2.11", "@ngtools/webpack": "^11.2.10", + "@types/duo_web_sdk": "^2.7.0", "@types/jquery": "^3.5.5", "@types/lunr": "^2.3.3", "@types/node": "^10.17.57", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 9b11af2353..3fb1700e63 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,5 @@ import * as jq from 'jquery'; -import Swal from 'sweetalert2/dist/sweetalert2.js'; +import Swal from 'sweetalert2'; import { BodyOutputType, diff --git a/src/app/dummy.module.ts b/src/app/dummy.module.ts deleted file mode 100644 index 62b7969531..0000000000 --- a/src/app/dummy.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { ModalComponent } from 'jslib/angular/components/modal.component'; - -@NgModule({ - imports: [], - declarations: [ - ModalComponent, - ], -}) -export class DummyModule { -} diff --git a/src/app/tools/import.component.ts b/src/app/tools/import.component.ts index 783ea31109..6a0210760c 100644 --- a/src/app/tools/import.component.ts +++ b/src/app/tools/import.component.ts @@ -10,7 +10,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service'; import { ImportOption, ImportService } from 'jslib/abstractions/import.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; -import Swal, { SweetAlertIcon } from 'sweetalert2/dist/sweetalert2.js'; +import Swal, { SweetAlertIcon } from 'sweetalert2'; @Component({ selector: 'app-import', diff --git a/src/services/webPlatformUtils.service.ts b/src/services/webPlatformUtils.service.ts index 79b765b987..286298f132 100644 --- a/src/services/webPlatformUtils.service.ts +++ b/src/services/webPlatformUtils.service.ts @@ -1,4 +1,4 @@ -import Swal, { SweetAlertIcon } from 'sweetalert2/dist/sweetalert2.js'; +import Swal, { SweetAlertIcon } from 'sweetalert2'; import { DeviceType } from 'jslib/enums/deviceType'; diff --git a/tsconfig.json b/tsconfig.json index d7b15b63f9..751b50f104 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,9 +11,7 @@ "es6", "dom" ], - "allowJs": true, "sourceMap": true, - "types": ["sweetalert2"], "baseUrl": ".", "paths": { "tldjs": [ @@ -21,32 +19,13 @@ ], "jslib/*": [ "jslib/src/*" - ], - "@angular/*": [ - "node_modules/@angular/*" - ], - "node": [ - "node_modules/@types/node" - ], - "duo_web_sdk": [ - "node_modules/duo_web_sdk" ] } }, "angularCompilerOptions": { "preserveWhitespaces": true }, - "exclude": [ - "node_modules", - "dist", - "build", - "jslib/node_modules", - "jslib/dist", - "jslib/spec", - "jslib/src/electron", - "jslib/src/cli", - "jslib/src/services/nodeApi.service.ts", - "jslib/src/services/lowdbStorage.service.ts", - "jslib/src/misc/nodeUtils.ts" + "include": [ + "src" ] }