From 6c18f5c1feef4a75c826ecd252ebf59564958887 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 1 Jun 2019 15:07:59 -0700 Subject: [PATCH] Use scoped packages, fix some typing issues --- .../addon-attach}/.gitignore | 0 .../addon-attach}/.npmignore | 0 .../addon-attach}/LICENSE | 0 .../addon-attach}/package.json | 2 +- .../addon-attach}/src/AttachAddon.api.ts | 0 .../addon-attach}/src/AttachAddon.ts | 11 +-- .../addon-attach}/src/tsconfig.json | 2 +- .../@xterm/addon-attach/typings/attach.d.ts | 29 ++++++++ .../addon-fit}/.gitignore | 0 .../addon-fit}/.npmignore | 0 .../addon-fit}/LICENSE | 0 .../addon-fit}/package.json | 2 +- .../addon-fit}/src/FitAddon.ts | 0 .../addon-fit}/src/tsconfig.json | 2 +- .../addon-fit}/typings/fit.d.ts | 2 +- .../addon-search}/.gitignore | 0 .../addon-search}/.npmignore | 0 .../addon-search}/LICENSE | 0 .../addon-search}/package.json | 2 +- .../addon-search}/src/SearchAddon.ts | 0 .../addon-search}/src/tsconfig.json | 2 +- .../@xterm/addon-search/typings/search.d.ts | 68 ++++++++++++++++++ .../addon-web-links}/.gitignore | 0 .../addon-web-links}/.npmignore | 0 .../addon-web-links}/LICENSE | 0 .../addon-web-links}/README.md | 0 .../addon-web-links}/package.json | 2 +- .../addon-web-links}/src/WebLinksAddon.api.ts | 0 .../addon-web-links}/src/WebLinksAddon.ts | 0 .../addon-web-links}/src/tsconfig.json | 2 +- .../addon-web-links}/typings/web-links.d.ts | 2 +- addons/xterm-addon-attach/typings/attach.d.ts | 27 ------- addons/xterm-addon-search/typings/search.d.ts | 71 ------------------- demo/client.ts | 8 +-- demo/tsconfig.json | 8 +-- package.json | 3 +- tsconfig.all.json | 8 +-- 37 files changed, 124 insertions(+), 129 deletions(-) rename addons/{xterm-addon-attach => @xterm/addon-attach}/.gitignore (100%) rename addons/{xterm-addon-attach => @xterm/addon-attach}/.npmignore (100%) rename addons/{xterm-addon-attach => @xterm/addon-attach}/LICENSE (100%) rename addons/{xterm-addon-attach => @xterm/addon-attach}/package.json (91%) rename addons/{xterm-addon-attach => @xterm/addon-attach}/src/AttachAddon.api.ts (100%) rename addons/{xterm-addon-attach => @xterm/addon-attach}/src/AttachAddon.ts (80%) rename addons/{xterm-addon-attach => @xterm/addon-attach}/src/tsconfig.json (88%) create mode 100644 addons/@xterm/addon-attach/typings/attach.d.ts rename addons/{xterm-addon-fit => @xterm/addon-fit}/.gitignore (100%) rename addons/{xterm-addon-fit => @xterm/addon-fit}/.npmignore (100%) rename addons/{xterm-addon-fit => @xterm/addon-fit}/LICENSE (100%) rename addons/{xterm-addon-fit => @xterm/addon-fit}/package.json (91%) rename addons/{xterm-addon-fit => @xterm/addon-fit}/src/FitAddon.ts (100%) rename addons/{xterm-addon-fit => @xterm/addon-fit}/src/tsconfig.json (88%) rename addons/{xterm-addon-fit => @xterm/addon-fit}/typings/fit.d.ts (96%) rename addons/{xterm-addon-search => @xterm/addon-search}/.gitignore (100%) rename addons/{xterm-addon-search => @xterm/addon-search}/.npmignore (100%) rename addons/{xterm-addon-search => @xterm/addon-search}/LICENSE (100%) rename addons/{xterm-addon-search => @xterm/addon-search}/package.json (91%) rename addons/{xterm-addon-search => @xterm/addon-search}/src/SearchAddon.ts (100%) rename addons/{xterm-addon-search => @xterm/addon-search}/src/tsconfig.json (87%) create mode 100644 addons/@xterm/addon-search/typings/search.d.ts rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/.gitignore (100%) rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/.npmignore (100%) rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/LICENSE (100%) rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/README.md (100%) rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/package.json (90%) rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/src/WebLinksAddon.api.ts (100%) rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/src/WebLinksAddon.ts (100%) rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/src/tsconfig.json (88%) rename addons/{xterm-addon-web-links => @xterm/addon-web-links}/typings/web-links.d.ts (95%) delete mode 100644 addons/xterm-addon-attach/typings/attach.d.ts delete mode 100644 addons/xterm-addon-search/typings/search.d.ts diff --git a/addons/xterm-addon-attach/.gitignore b/addons/@xterm/addon-attach/.gitignore similarity index 100% rename from addons/xterm-addon-attach/.gitignore rename to addons/@xterm/addon-attach/.gitignore diff --git a/addons/xterm-addon-attach/.npmignore b/addons/@xterm/addon-attach/.npmignore similarity index 100% rename from addons/xterm-addon-attach/.npmignore rename to addons/@xterm/addon-attach/.npmignore diff --git a/addons/xterm-addon-attach/LICENSE b/addons/@xterm/addon-attach/LICENSE similarity index 100% rename from addons/xterm-addon-attach/LICENSE rename to addons/@xterm/addon-attach/LICENSE diff --git a/addons/xterm-addon-attach/package.json b/addons/@xterm/addon-attach/package.json similarity index 91% rename from addons/xterm-addon-attach/package.json rename to addons/@xterm/addon-attach/package.json index 20d0ec21..f1bcc459 100644 --- a/addons/xterm-addon-attach/package.json +++ b/addons/@xterm/addon-attach/package.json @@ -1,5 +1,5 @@ { - "name": "xterm-addon-attach", + "name": "@xterm/addon-attach", "version": "0.1.0-beta8", "author": { "name": "The xterm.js authors", diff --git a/addons/xterm-addon-attach/src/AttachAddon.api.ts b/addons/@xterm/addon-attach/src/AttachAddon.api.ts similarity index 100% rename from addons/xterm-addon-attach/src/AttachAddon.api.ts rename to addons/@xterm/addon-attach/src/AttachAddon.api.ts diff --git a/addons/xterm-addon-attach/src/AttachAddon.ts b/addons/@xterm/addon-attach/src/AttachAddon.ts similarity index 80% rename from addons/xterm-addon-attach/src/AttachAddon.ts rename to addons/@xterm/addon-attach/src/AttachAddon.ts index 11fb5580..9dc45ecb 100644 --- a/addons/xterm-addon-attach/src/AttachAddon.ts +++ b/addons/@xterm/addon-attach/src/AttachAddon.ts @@ -12,11 +12,6 @@ interface IAttachOptions { inputUtf8?: boolean; } -// TODO: To be removed once UTF8 PR is in xterm.js package. -interface INewTerminal extends Terminal { - writeUtf8(data: Uint8Array): void; -} - export class AttachAddon implements ITerminalAddon { private _socket: WebSocket; private _bidirectional: boolean; @@ -34,14 +29,14 @@ export class AttachAddon implements ITerminalAddon { public activate(terminal: Terminal): void { if (this._utf8) { this._disposables.push(addSocketListener(this._socket, 'message', - (ev: MessageEvent | Event | CloseEvent) => (terminal as INewTerminal).writeUtf8(new Uint8Array((ev as any).data as ArrayBuffer)))); + (ev: MessageEvent | Event | CloseEvent) => terminal.writeUtf8(new Uint8Array((ev as any).data as ArrayBuffer)))); } else { this._disposables.push(addSocketListener(this._socket, 'message', - (ev: MessageEvent | Event | CloseEvent) => (terminal as INewTerminal).write((ev as any).data as string))); + (ev: MessageEvent | Event | CloseEvent) => terminal.write((ev as any).data as string))); } if (this._bidirectional) { - this._disposables.push(terminal.addDisposableListener('data', data => this._sendData(data))); + this._disposables.push(terminal.onData(data => this._sendData(data))); } this._disposables.push(addSocketListener(this._socket, 'close', () => this.dispose())); diff --git a/addons/xterm-addon-attach/src/tsconfig.json b/addons/@xterm/addon-attach/src/tsconfig.json similarity index 88% rename from addons/xterm-addon-attach/src/tsconfig.json rename to addons/@xterm/addon-attach/src/tsconfig.json index 9a92ab48..d7338b28 100644 --- a/addons/xterm-addon-attach/src/tsconfig.json +++ b/addons/@xterm/addon-attach/src/tsconfig.json @@ -14,6 +14,6 @@ }, "include": [ "./**/*", - "../../../typings/xterm.d.ts" + "../../../../typings/xterm.d.ts" ] } diff --git a/addons/@xterm/addon-attach/typings/attach.d.ts b/addons/@xterm/addon-attach/typings/attach.d.ts new file mode 100644 index 00000000..da2fb6e1 --- /dev/null +++ b/addons/@xterm/addon-attach/typings/attach.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2017 The xterm.js authors. All rights reserved. + * @license MIT + */ + +import { Terminal, ILinkMatcherOptions, ITerminalAddon } from 'xterm'; + +declare module '@xterm/addon-attach' { + export interface IAttachOptions { + /** + * Whether input should be written to the backend. Defaults to `true`. + */ + bidirectional?: boolean; + + /** + * Whether to use UTF8 binary transport for incoming messages. Defaults to `false`. + * Note: This must be in line with the server side of the websocket. + * Always send string messages from the backend if this options is false, + * otherwise always binary UTF8 data. + */ + inputUtf8?: boolean; + } + + export class AttachAddon implements ITerminalAddon { + constructor(socket: WebSocket, options?: IAttachOptions); + public activate(terminal: Terminal): void; + public dispose(): void; + } +} diff --git a/addons/xterm-addon-fit/.gitignore b/addons/@xterm/addon-fit/.gitignore similarity index 100% rename from addons/xterm-addon-fit/.gitignore rename to addons/@xterm/addon-fit/.gitignore diff --git a/addons/xterm-addon-fit/.npmignore b/addons/@xterm/addon-fit/.npmignore similarity index 100% rename from addons/xterm-addon-fit/.npmignore rename to addons/@xterm/addon-fit/.npmignore diff --git a/addons/xterm-addon-fit/LICENSE b/addons/@xterm/addon-fit/LICENSE similarity index 100% rename from addons/xterm-addon-fit/LICENSE rename to addons/@xterm/addon-fit/LICENSE diff --git a/addons/xterm-addon-fit/package.json b/addons/@xterm/addon-fit/package.json similarity index 91% rename from addons/xterm-addon-fit/package.json rename to addons/@xterm/addon-fit/package.json index fe1f4cb7..a2ac73f0 100644 --- a/addons/xterm-addon-fit/package.json +++ b/addons/@xterm/addon-fit/package.json @@ -1,5 +1,5 @@ { - "name": "xterm-addon-fit", + "name": "@xterm/addon-fit", "version": "0.1.0-beta7", "author": { "name": "The xterm.js authors", diff --git a/addons/xterm-addon-fit/src/FitAddon.ts b/addons/@xterm/addon-fit/src/FitAddon.ts similarity index 100% rename from addons/xterm-addon-fit/src/FitAddon.ts rename to addons/@xterm/addon-fit/src/FitAddon.ts diff --git a/addons/xterm-addon-fit/src/tsconfig.json b/addons/@xterm/addon-fit/src/tsconfig.json similarity index 88% rename from addons/xterm-addon-fit/src/tsconfig.json rename to addons/@xterm/addon-fit/src/tsconfig.json index 6b914e81..cff0857b 100644 --- a/addons/xterm-addon-fit/src/tsconfig.json +++ b/addons/@xterm/addon-fit/src/tsconfig.json @@ -14,6 +14,6 @@ }, "include": [ "./**/*", - "../../../typings/xterm.d.ts" + "../../../../typings/xterm.d.ts" ] } diff --git a/addons/xterm-addon-fit/typings/fit.d.ts b/addons/@xterm/addon-fit/typings/fit.d.ts similarity index 96% rename from addons/xterm-addon-fit/typings/fit.d.ts rename to addons/@xterm/addon-fit/typings/fit.d.ts index c3b0b4af..aabde31d 100644 --- a/addons/xterm-addon-fit/typings/fit.d.ts +++ b/addons/@xterm/addon-fit/typings/fit.d.ts @@ -5,7 +5,7 @@ import { Terminal, ITerminalAddon } from 'xterm'; -declare module 'xterm-addon-fit' { +declare module '@xterm/addon-fit' { /** * An xterm.js addon that enables resizing the terminal to the dimensions of * its containing element. diff --git a/addons/xterm-addon-search/.gitignore b/addons/@xterm/addon-search/.gitignore similarity index 100% rename from addons/xterm-addon-search/.gitignore rename to addons/@xterm/addon-search/.gitignore diff --git a/addons/xterm-addon-search/.npmignore b/addons/@xterm/addon-search/.npmignore similarity index 100% rename from addons/xterm-addon-search/.npmignore rename to addons/@xterm/addon-search/.npmignore diff --git a/addons/xterm-addon-search/LICENSE b/addons/@xterm/addon-search/LICENSE similarity index 100% rename from addons/xterm-addon-search/LICENSE rename to addons/@xterm/addon-search/LICENSE diff --git a/addons/xterm-addon-search/package.json b/addons/@xterm/addon-search/package.json similarity index 91% rename from addons/xterm-addon-search/package.json rename to addons/@xterm/addon-search/package.json index f7910d0d..6b7b1013 100644 --- a/addons/xterm-addon-search/package.json +++ b/addons/@xterm/addon-search/package.json @@ -1,5 +1,5 @@ { - "name": "xterm-addon-search", + "name": "@xterm/addon-search", "version": "0.1.0-beta4", "author": { "name": "The xterm.js authors", diff --git a/addons/xterm-addon-search/src/SearchAddon.ts b/addons/@xterm/addon-search/src/SearchAddon.ts similarity index 100% rename from addons/xterm-addon-search/src/SearchAddon.ts rename to addons/@xterm/addon-search/src/SearchAddon.ts diff --git a/addons/xterm-addon-search/src/tsconfig.json b/addons/@xterm/addon-search/src/tsconfig.json similarity index 87% rename from addons/xterm-addon-search/src/tsconfig.json rename to addons/@xterm/addon-search/src/tsconfig.json index fcf70ba9..4d23cc99 100644 --- a/addons/xterm-addon-search/src/tsconfig.json +++ b/addons/@xterm/addon-search/src/tsconfig.json @@ -13,6 +13,6 @@ }, "include": [ "./**/*", - "../../../typings/xterm.d.ts" + "../../../../typings/xterm.d.ts" ] } diff --git a/addons/@xterm/addon-search/typings/search.d.ts b/addons/@xterm/addon-search/typings/search.d.ts new file mode 100644 index 00000000..da6ec32c --- /dev/null +++ b/addons/@xterm/addon-search/typings/search.d.ts @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2017 The xterm.js authors. All rights reserved. + * @license MIT + */ + +import { Terminal, ILinkMatcherOptions, IDisposable, ITerminalAddon } from 'xterm'; + +declare module '@xterm/addon-search' { + /** + * Options for a search. + */ + export interface ISearchOptions { + /** + * Whether the search term is a regex. + */ + regex?: boolean; + + /** + * Whether to search for a whole word, the result is only valid if it's + * suppounded in "non-word" characters such as `_`, `(`, `)` or space. + */ + wholeWord?: boolean; + + /** + * Whether the search is case sensitive. + */ + caseSensitive?: boolean; + + /** + * Whether to do an indcremental search, this will expand the selection if it + * still matches the term the user typed. Note that this only affects + * `findNext`, not `findPrevious`. + */ + incremental?: boolean; + } + + /** + * An xterm.js addon that provides search functionality. + */ + export class SearchAddon implements ITerminalAddon { + /** + * Activates the addon + * @param terminal The terminal the addon is being loaded in. + */ + public activate(terminal: Terminal): void; + + /** + * Disposes the addon. + */ + public dispose(): void; + + /** + * Search forwards for the next result that matches the search term and + * options. + * @param term The search term. + * @param searchOptions The options for the search. + */ + public findNext(term: string, searchOptions?: ISearchOptions): boolean; + + /** + * Search backwards for the previous result that matches the search term and + * options. + * @param term The search term. + * @param searchOptions The options for the search. + */ + public findPrevious(term: string, searchOptions?: ISearchOptions): boolean; + } +} diff --git a/addons/xterm-addon-web-links/.gitignore b/addons/@xterm/addon-web-links/.gitignore similarity index 100% rename from addons/xterm-addon-web-links/.gitignore rename to addons/@xterm/addon-web-links/.gitignore diff --git a/addons/xterm-addon-web-links/.npmignore b/addons/@xterm/addon-web-links/.npmignore similarity index 100% rename from addons/xterm-addon-web-links/.npmignore rename to addons/@xterm/addon-web-links/.npmignore diff --git a/addons/xterm-addon-web-links/LICENSE b/addons/@xterm/addon-web-links/LICENSE similarity index 100% rename from addons/xterm-addon-web-links/LICENSE rename to addons/@xterm/addon-web-links/LICENSE diff --git a/addons/xterm-addon-web-links/README.md b/addons/@xterm/addon-web-links/README.md similarity index 100% rename from addons/xterm-addon-web-links/README.md rename to addons/@xterm/addon-web-links/README.md diff --git a/addons/xterm-addon-web-links/package.json b/addons/@xterm/addon-web-links/package.json similarity index 90% rename from addons/xterm-addon-web-links/package.json rename to addons/@xterm/addon-web-links/package.json index 83ea31c6..df2b2566 100644 --- a/addons/xterm-addon-web-links/package.json +++ b/addons/@xterm/addon-web-links/package.json @@ -1,5 +1,5 @@ { - "name": "xterm-addon-web-links", + "name": "@xtermaddon-web-links", "version": "0.1.0-beta7", "author": { "name": "The xterm.js authors", diff --git a/addons/xterm-addon-web-links/src/WebLinksAddon.api.ts b/addons/@xterm/addon-web-links/src/WebLinksAddon.api.ts similarity index 100% rename from addons/xterm-addon-web-links/src/WebLinksAddon.api.ts rename to addons/@xterm/addon-web-links/src/WebLinksAddon.api.ts diff --git a/addons/xterm-addon-web-links/src/WebLinksAddon.ts b/addons/@xterm/addon-web-links/src/WebLinksAddon.ts similarity index 100% rename from addons/xterm-addon-web-links/src/WebLinksAddon.ts rename to addons/@xterm/addon-web-links/src/WebLinksAddon.ts diff --git a/addons/xterm-addon-web-links/src/tsconfig.json b/addons/@xterm/addon-web-links/src/tsconfig.json similarity index 88% rename from addons/xterm-addon-web-links/src/tsconfig.json rename to addons/@xterm/addon-web-links/src/tsconfig.json index 6b914e81..cff0857b 100644 --- a/addons/xterm-addon-web-links/src/tsconfig.json +++ b/addons/@xterm/addon-web-links/src/tsconfig.json @@ -14,6 +14,6 @@ }, "include": [ "./**/*", - "../../../typings/xterm.d.ts" + "../../../../typings/xterm.d.ts" ] } diff --git a/addons/xterm-addon-web-links/typings/web-links.d.ts b/addons/@xterm/addon-web-links/typings/web-links.d.ts similarity index 95% rename from addons/xterm-addon-web-links/typings/web-links.d.ts rename to addons/@xterm/addon-web-links/typings/web-links.d.ts index 83a3474d..f2ad23ff 100644 --- a/addons/xterm-addon-web-links/typings/web-links.d.ts +++ b/addons/@xterm/addon-web-links/typings/web-links.d.ts @@ -6,7 +6,7 @@ import { Terminal, IDisposable, ILinkMatcherOptions } from 'xterm'; -declare module 'xterm-addon-web-links' { +declare module '@xterm/addon-web-links' { // TODO: This is temporary, link to xterm when the new version is published export interface ITerminalAddon extends IDisposable { activate(terminal: Terminal): void; diff --git a/addons/xterm-addon-attach/typings/attach.d.ts b/addons/xterm-addon-attach/typings/attach.d.ts deleted file mode 100644 index f81f2882..00000000 --- a/addons/xterm-addon-attach/typings/attach.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) 2017 The xterm.js authors. All rights reserved. - * @license MIT - */ - -import { Terminal, ILinkMatcherOptions, ITerminalAddon } from 'xterm'; - -export interface IAttachOptions { - /** - * Whether input should be written to the backend. Defaults to `true`. - */ - bidirectional?: boolean; - - /** - * Whether to use UTF8 binary transport for incoming messages. Defaults to `false`. - * Note: This must be in line with the server side of the websocket. - * Always send string messages from the backend if this options is false, - * otherwise always binary UTF8 data. - */ - inputUtf8?: boolean; -} - -export class AttachAddon implements ITerminalAddon { - constructor(socket: WebSocket, options?: IAttachOptions); - public activate(terminal: Terminal): void; - public dispose(): void; -} diff --git a/addons/xterm-addon-search/typings/search.d.ts b/addons/xterm-addon-search/typings/search.d.ts deleted file mode 100644 index 50c5b1cf..00000000 --- a/addons/xterm-addon-search/typings/search.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2017 The xterm.js authors. All rights reserved. - * @license MIT - */ - -import { Terminal, ILinkMatcherOptions, IDisposable } from 'xterm'; - -// TODO: This is temporary, link to xterm when the new version is published -export interface ITerminalAddon extends IDisposable { - activate(terminal: Terminal): void; -} - -/** - * Options for a search. - */ -export interface ISearchOptions { - /** - * Whether the search term is a regex. - */ - regex?: boolean; - - /** - * Whether to search for a whole word, the result is only valid if it's - * suppounded in "non-word" characters such as `_`, `(`, `)` or space. - */ - wholeWord?: boolean; - - /** - * Whether the search is case sensitive. - */ - caseSensitive?: boolean; - - /** - * Whether to do an indcremental search, this will expand the selection if it - * still matches the term the user typed. Note that this only affects - * `findNext`, not `findPrevious`. - */ - incremental?: boolean; -} - -/** - * An xterm.js addon that provides search functionality. - */ -export class SearchAddon implements ITerminalAddon { - /** - * Activates the addon - * @param terminal The terminal the addon is being loaded in. - */ - public activate(terminal: Terminal): void; - - /** - * Disposes the addon. - */ - public dispose(): void; - - /** - * Search forwards for the next result that matches the search term and - * options. - * @param term The search term. - * @param searchOptions The options for the search. - */ - public findNext(term: string, searchOptions?: ISearchOptions): boolean; - - /** - * Search backwards for the previous result that matches the search term and - * options. - * @param term The search term. - * @param searchOptions The options for the search. - */ - public findPrevious(term: string, searchOptions?: ISearchOptions): boolean; -} diff --git a/demo/client.ts b/demo/client.ts index 1841e991..a832b4ec 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -12,10 +12,10 @@ import { Terminal } from '../out/public/Terminal'; // Use webpacked version (yarn package) // import { Terminal } from '../lib/xterm'; -import { AttachAddon } from 'xterm-addon-attach'; -import { FitAddon } from 'xterm-addon-fit'; -import { SearchAddon, ISearchOptions } from 'xterm-addon-search'; -import { WebLinksAddon } from 'xterm-addon-web-links'; +import { AttachAddon } from '@xterm/addon-attach'; +import { FitAddon } from '@xterm/addon-fit'; +import { SearchAddon, ISearchOptions } from '@xterm/addon-search'; +import { WebLinksAddon } from '@xterm/addon-web-links'; // Pulling in the module's types relies on the above, it's looks a // little weird here as we're importing "this" module diff --git a/demo/tsconfig.json b/demo/tsconfig.json index 2bf76f67..446adade 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -6,10 +6,10 @@ "sourceMap": true, "baseUrl": ".", "paths": { - "xterm-addon-attach": ["../addons/xterm-addon-attach"], - "xterm-addon-fit": ["../addons/xterm-addon-fit"], - "xterm-addon-search": ["../addons/xterm-addon-search"], - "xterm-addon-web-links": ["../addons/xterm-addon-web-links"] + "@xterm/addon-attach": ["../addons/@xterm/addon-attach"], + "@xterm/addon-fit": ["../addons/@xterm/addon-fit"], + "@xterm/addon-search": ["../addons/@xterm/addon-search"], + "@xterm/addon-web-links": ["../addons/@xterm/addon-web-links"] } }, "include": [ diff --git a/package.json b/package.json index 0cd097fd..022e4e40 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "build": "tsc -b ./tsconfig.all.json", "prepare": "npm run build", "prepublishOnly": "npm run package", - "watch": "tsc -b -w ./tsconfig.all.json --preserveWatchOutput" + "watch": "tsc -b -w ./tsconfig.all.json --preserveWatchOutput", + "clean": "rm -rf lib out addons/@xterm/*/lib" }, "devDependencies": { "@types/chai": "^3.4.34", diff --git a/tsconfig.all.json b/tsconfig.all.json index 4de8e9b5..cb33f9c7 100644 --- a/tsconfig.all.json +++ b/tsconfig.all.json @@ -3,9 +3,9 @@ "include": [], "references": [ { "path": "./src" }, - { "path": "./addons/xterm-addon-attach/src" }, - { "path": "./addons/xterm-addon-fit/src" }, - { "path": "./addons/xterm-addon-search/src" }, - { "path": "./addons/xterm-addon-web-links/src" } + { "path": "./addons/@xterm/addon-attach/src" }, + { "path": "./addons/@xterm/addon-fit/src" }, + { "path": "./addons/@xterm/addon-search/src" }, + { "path": "./addons/@xterm/addon-web-links/src" } ] }