Kind of working setup

This commit is contained in:
Daniel Imms
2019-05-26 11:05:23 -07:00
parent 44e01ba006
commit 38afe991b2
26 changed files with 87 additions and 38 deletions
+4 -1
View File
@@ -7,7 +7,10 @@
/// <reference path="../typings/xterm.d.ts"/>
import { Terminal } from '../lib/public/Terminal';
const t = require('../lib2/xterm');
console.log(t);
import { Terminal } from '../lib2/xterm';
console.log('t2', Terminal);
import { AttachAddon } from 'xterm-addon-attach';
import { SearchAddon, ISearchOptions } from 'xterm-addon-search';
import { WebLinksAddon } from 'xterm-addon-web-links';
+5 -1
View File
@@ -32,7 +32,11 @@ const clientConfig = {
},
resolve: {
modules: [path.resolve(__dirname, '..'), 'node_modules'],
extensions: [ '.tsx', '.ts', '.js' ]
extensions: [ '.tsx', '.ts', '.js' ],
alias: {
common: path.resolve(__dirname, '../lib/common'),
core: path.resolve(__dirname, '../lib/core')
}
},
output: {
filename: 'client-bundle.js',
+1
View File
@@ -52,6 +52,7 @@
"zmodem.js": "^0.1.5"
},
"scripts": {
"lib2": "webpack",
"start": "node demo/start",
"start-debug": "node --inspect-brk demo/start",
"start-zmodem": "node demo/zmodem/app",
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { assert } from 'chai';
import { CircularList } from './CircularList';
import { CircularList } from 'common/CircularList';
describe('CircularList', () => {
describe('push', () => {
+2 -2
View File
@@ -3,8 +3,8 @@
* @license MIT
*/
import { ICircularList } from './Types';
import { EventEmitter2, IEvent } from './EventEmitter2';
import { ICircularList } from 'common/Types';
import { EventEmitter2, IEvent } from 'common/EventEmitter2';
export interface IInsertEvent {
index: number;
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { assert, expect } from 'chai';
import { clone } from './Clone';
import { clone } from 'common/Clone';
describe('clone', () => {
it('should clone simple objects', () => {
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { assert } from 'chai';
import { EventEmitter } from './EventEmitter';
import { EventEmitter } from 'common/EventEmitter';
describe('EventEmitter', () => {
let eventEmitter: EventEmitter;
+2 -2
View File
@@ -3,8 +3,8 @@
* @license MIT
*/
import { IDisposable, IEventEmitter, XtermListener } from './Types';
import { Disposable } from './Lifecycle';
import { IDisposable, IEventEmitter, XtermListener } from 'common/Types';
import { Disposable } from 'common/Lifecycle';
export class EventEmitter extends Disposable implements IEventEmitter, IDisposable {
private _events: {[type: string]: XtermListener[]};
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { assert } from 'chai';
import { EventEmitter2 } from './EventEmitter2';
import { EventEmitter2 } from 'common/EventEmitter2';
describe('EventEmitter2', () => {
it('should fire listeners multiple times', () => {
+1 -1
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { IDisposable } from './Types';
import { IDisposable } from 'common/Types';
interface IListener<T> {
(e: T): void;
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { assert } from 'chai';
import { Disposable } from './Lifecycle';
import { Disposable } from 'common/Lifecycle';
class TestDisposable extends Disposable {
public get isDisposed(): boolean {
+1 -1
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { IDisposable } from './Types';
import { IDisposable } from 'common/Types';
/**
* A base class that can be extended to provide convenience methods for managing the lifecycle of an
+1 -1
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { assert } from 'chai';
import { fillFallback, concat } from './TypedArrayUtils';
import { fillFallback, concat } from 'common/TypedArrayUtils';
type TypedArray = Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray
| Int8Array | Int16Array | Int32Array
+2 -2
View File
@@ -3,8 +3,8 @@
* @license MIT
*/
import { IEvent, EventEmitter2 } from './EventEmitter2';
import { IDeleteEvent, IInsertEvent } from './CircularList';
import { IEvent, EventEmitter2 } from 'common/EventEmitter2';
import { IDeleteEvent, IInsertEvent } from 'common/CircularList';
export const DEFAULT_COLOR = 256;
+5 -1
View File
@@ -4,7 +4,11 @@
"outDir": "../../lib",
"types": [
"../../node_modules/@types/mocha"
]
],
"baseUrl": "..",
"paths": {
"common/*": [ "./common/*" ]
}
},
"include": [ "./**/*" ]
}
+1 -1
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { IDisposable } from '../common/Types';
import { IDisposable } from 'common/Types';
export const enum KeyboardResultType {
SEND_KEY,
+3 -3
View File
@@ -2,9 +2,9 @@
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { CharData, IBufferLine, ICellData, IColorRGB, IAttributeData } from '../Types';
import { stringFromCodePoint } from '../input/TextDecoder';
import { DEFAULT_COLOR } from '../../common/Types';
import { CharData, IBufferLine, ICellData, IColorRGB, IAttributeData } from 'core/Types';
import { stringFromCodePoint } from 'core/input/TextDecoder';
import { DEFAULT_COLOR } from 'common/Types';
export const DEFAULT_ATTR = (0 << 18) | (DEFAULT_COLOR << 9) | (256 << 0);
+2 -2
View File
@@ -3,8 +3,8 @@
* @license MIT
*/
import { assert } from 'chai';
import { BufferLine, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE } from './BufferLine';
import { reflowSmallerGetNewLineLengths } from './BufferReflow';
import { BufferLine, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE } from 'core/buffer/BufferLine';
import { reflowSmallerGetNewLineLengths } from 'core/buffer/BufferReflow';
describe('BufferReflow', () => {
describe('reflowSmallerGetNewLineLengths', () => {
+3 -3
View File
@@ -3,9 +3,9 @@
* @license MIT
*/
import { BufferLine } from './BufferLine';
import { CircularList } from '../../common/CircularList';
import { IBufferLine, ICellData } from '../Types';
import { BufferLine } from 'core/buffer/BufferLine';
import { CircularList } from 'common/CircularList';
import { IBufferLine, ICellData } from 'core/Types';
export interface INewLayoutResult {
layout: number[];
+3 -3
View File
@@ -3,9 +3,9 @@
* @license MIT
*/
import { EventEmitter2, IEvent } from '../../common/EventEmitter2';
import { Disposable } from '../../common/Lifecycle';
import { IMarker } from '../Types';
import { EventEmitter2, IEvent } from 'common/EventEmitter2';
import { Disposable } from 'common/Lifecycle';
import { IMarker } from 'core/Types';
export class Marker extends Disposable implements IMarker {
private static _nextId = 1;

Some files were not shown because too many files have changed in this diff Show More