From 33915f3ae0867419b744b49f2a1d7cdc3e5b7f7d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 18 Sep 2018 09:49:07 -0700 Subject: [PATCH] Improve structure of addon tsconfigs --- src/addons/fit/tsconfig.json | 11 +++++++---- src/addons/fullscreen/tsconfig.json | 11 +++++++---- src/addons/search/search.test.ts | 3 ++- src/addons/search/tsconfig.json | 11 +++++++---- src/addons/terminado/tsconfig.json | 11 +++++++---- src/addons/webLinks/tsconfig.json | 9 ++++++--- src/addons/winptyCompat/tsconfig.json | 9 ++++++--- src/addons/zmodem/tsconfig.json | 9 ++++++--- 8 files changed, 48 insertions(+), 26 deletions(-) diff --git a/src/addons/fit/tsconfig.json b/src/addons/fit/tsconfig.json index bccb2ef1..f478e03f 100644 --- a/src/addons/fit/tsconfig.json +++ b/src/addons/fit/tsconfig.json @@ -4,17 +4,20 @@ "target": "es5", "lib": [ "dom", - "es6", + "es5" ], "rootDir": ".", "outDir": "../../../lib/addons/fit/", "sourceMap": true, "removeComments": true, "declaration": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "types": [ + "../../node_modules/@types/mocha", + "../.." + ] }, "include": [ - "**/*.ts", - "../../../typings/xterm.d.ts" + "**/*.ts" ] } diff --git a/src/addons/fullscreen/tsconfig.json b/src/addons/fullscreen/tsconfig.json index cdebd36d..40d0ae71 100644 --- a/src/addons/fullscreen/tsconfig.json +++ b/src/addons/fullscreen/tsconfig.json @@ -4,17 +4,20 @@ "target": "es5", "lib": [ "dom", - "es6", + "es5" ], "rootDir": ".", "outDir": "../../../lib/addons/fullscreen/", "sourceMap": true, "removeComments": true, "declaration": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "types": [ + "../../node_modules/@types/mocha", + "../.." + ] }, "include": [ - "**/*.ts", - "../../../typings/xterm.d.ts" + "**/*.ts" ] } diff --git a/src/addons/search/search.test.ts b/src/addons/search/search.test.ts index ccdebaf3..3d2a7d9c 100644 --- a/src/addons/search/search.test.ts +++ b/src/addons/search/search.test.ts @@ -7,6 +7,7 @@ import { assert, expect } from 'chai'; import * as search from './search'; import { SearchHelper } from './SearchHelper'; import { ISearchOptions, ISearchResult } from './Interfaces'; +import { Terminal } from '../../../lib/Terminal'; class MockTerminalPlain {} @@ -16,7 +17,7 @@ class MockTerminal { public searchHelper: TestSearchHelper; public cols: number; constructor(options: any) { - this._core = new (require('../../../lib/Terminal').Terminal)(options); + this._core = new Terminal(options); this.searchHelper = new TestSearchHelper(this as any); this.cols = options.cols; } diff --git a/src/addons/search/tsconfig.json b/src/addons/search/tsconfig.json index 5e9fa502..e7a1ff3d 100644 --- a/src/addons/search/tsconfig.json +++ b/src/addons/search/tsconfig.json @@ -4,17 +4,20 @@ "target": "es5", "lib": [ "dom", - "es6", + "es5" ], "rootDir": ".", "outDir": "../../../lib/addons/search/", "sourceMap": true, "removeComments": true, "declaration": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "types": [ + "../../node_modules/@types/mocha", + "../.." + ] }, "include": [ - "**/*.ts", - "../../../typings/xterm.d.ts" + "**/*.ts" ] } diff --git a/src/addons/terminado/tsconfig.json b/src/addons/terminado/tsconfig.json index 66e90d90..52b14805 100644 --- a/src/addons/terminado/tsconfig.json +++ b/src/addons/terminado/tsconfig.json @@ -4,17 +4,20 @@ "target": "es5", "lib": [ "dom", - "es6", + "es5", ], "rootDir": ".", "outDir": "../../../lib/addons/terminado/", "sourceMap": true, "removeComments": true, "declaration": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "types": [ + "../../node_modules/@types/mocha", + "../.." + ] }, "include": [ - "**/*.ts", - "../../../typings/xterm.d.ts" + "**/*.ts" ] } diff --git a/src/addons/webLinks/tsconfig.json b/src/addons/webLinks/tsconfig.json index a1cc8968..c577386e 100644 --- a/src/addons/webLinks/tsconfig.json +++ b/src/addons/webLinks/tsconfig.json @@ -11,10 +11,13 @@ "sourceMap": true, "removeComments": true, "declaration": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "types": [ + "../../node_modules/@types/mocha", + "../.." + ] }, "include": [ - "**/*.ts", - "../../../typings/xterm.d.ts" + "**/*.ts" ] } diff --git a/src/addons/winptyCompat/tsconfig.json b/src/addons/winptyCompat/tsconfig.json index 8a4fe2dc..949fd9ea 100644 --- a/src/addons/winptyCompat/tsconfig.json +++ b/src/addons/winptyCompat/tsconfig.json @@ -11,10 +11,13 @@ "sourceMap": true, "removeComments": true, "declaration": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "types": [ + "../../node_modules/@types/mocha", + "../.." + ] }, "include": [ - "**/*.ts", - "../../../typings/xterm.d.ts" + "**/*.ts" ] } diff --git a/src/addons/zmodem/tsconfig.json b/src/addons/zmodem/tsconfig.json index e2fdfeb0..115054ca 100644 --- a/src/addons/zmodem/tsconfig.json +++ b/src/addons/zmodem/tsconfig.json @@ -11,10 +11,13 @@ "sourceMap": true, "removeComments": true, "declaration": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "types": [ + "../../node_modules/@types/mocha", + "../.." + ] }, "include": [ - "**/*.ts", - "../../../typings/xterm.d.ts" + "**/*.ts" ] }