mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Get sources building with esbuild
This commit is contained in:
+4
-1
@@ -45,10 +45,13 @@
|
||||
"addons/*/src/third-party/*.ts",
|
||||
"out/*",
|
||||
"out-test/*",
|
||||
"out-esbuild/*",
|
||||
"out-esbuild-test/*",
|
||||
"**/inwasm-sdks/*",
|
||||
"**/typings/*.d.ts",
|
||||
"**/node_modules",
|
||||
"**/*.js"
|
||||
"**/*.js",
|
||||
"**/*.mjs"
|
||||
],
|
||||
"plugins": [
|
||||
"@stylistic/ts",
|
||||
|
||||
@@ -4,6 +4,8 @@ node_modules/
|
||||
lib/
|
||||
out/
|
||||
out-test/
|
||||
out-esbuild/
|
||||
out-esbuild-test/
|
||||
.nyc_output/
|
||||
Makefile.gyp
|
||||
*.Makefile
|
||||
|
||||
Vendored
+6
-2
@@ -7,10 +7,14 @@
|
||||
"mochaExplorer.envPath": ".mocha.env",
|
||||
"mochaExplorer.files": [
|
||||
"out/**/*.test.js",
|
||||
"addons/**/out/*.test.js"
|
||||
"addons/**/out/*.test.js",
|
||||
"out-*/**/*.test.js",
|
||||
"addons/**/out-*/*.test.js"
|
||||
],
|
||||
"mochaExplorer.watch": [
|
||||
"out/**/*.js",
|
||||
"addons/**/out/*.js"
|
||||
"addons/**/out/*.js",
|
||||
"out-*/**/*.js",
|
||||
"addons/**/out-*/*.js"
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+60
-54
@@ -7,7 +7,66 @@
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": true
|
||||
},
|
||||
"tasks": [
|
||||
"tasks": [// Compound tasks
|
||||
{
|
||||
"label": "Development",
|
||||
"dependsOn": ["demo-server", "tsc", "esbuild", "esbuild-demo"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
|
||||
// Demo
|
||||
{
|
||||
"label": "demo-server",
|
||||
"type": "npm",
|
||||
"script": "start",
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"group": "xterm-demo"
|
||||
}
|
||||
},
|
||||
|
||||
// Build
|
||||
{
|
||||
"label": "tsc",
|
||||
"type": "npm",
|
||||
"script": "tsc-watch",
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"problemMatcher": "$tsc-watch",
|
||||
"presentation": {
|
||||
"group": "xterm-build"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "esbuild",
|
||||
"type": "npm",
|
||||
"script": "esbuild-watch",
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"problemMatcher": "$esbuild-watch",
|
||||
"presentation": {
|
||||
"group": "xterm-build"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "esbuild-demo",
|
||||
"type": "npm",
|
||||
"script": "esbuild-demo-watch",
|
||||
"dependsOn": ["esbuild", "tsc"],
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"problemMatcher": "$esbuild-watch",
|
||||
"presentation": {
|
||||
"group": "xterm-demo"
|
||||
}
|
||||
},
|
||||
|
||||
// Test
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "test",
|
||||
@@ -16,59 +75,6 @@
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"type": "npm",
|
||||
"script": "watch",
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"problemMatcher": "$tsc-watch",
|
||||
"presentation": {
|
||||
"group": "vscode"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "start",
|
||||
"type": "npm",
|
||||
"script": "start",
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"group": "vscode"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Start demo",
|
||||
"dependsOn": ["start", "watch"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"fileLocation": [
|
||||
"relative",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"beginsPattern": "assets by",
|
||||
"endsPattern": "webpack \\d+\\.\\d+\\.\\d+ compiled successfully"
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"group": "vscode"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"prepackage": "npm run build",
|
||||
"package": "../../node_modules/.bin/webpack",
|
||||
"prepublishOnly": "npm run package",
|
||||
"start-server-only": "node ../../demo/start-server-only"
|
||||
"start": "node ../../demo/start"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@xterm/xterm": "^5.0.0"
|
||||
|
||||
@@ -26,7 +26,7 @@ const config: PlaywrightTestConfig = {
|
||||
],
|
||||
reporter: 'list',
|
||||
webServer: {
|
||||
command: 'npm run start-server-only',
|
||||
command: 'npm run start',
|
||||
port: 3000,
|
||||
timeout: 120000,
|
||||
reuseExistingServer: !process.env.CI
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"prepackage": "npm run build",
|
||||
"package": "../../node_modules/.bin/webpack",
|
||||
"prepublishOnly": "npm run package",
|
||||
"start-server-only": "node ../../demo/start-server-only"
|
||||
"start": "node ../../demo/start"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@xterm/xterm": "^5.0.0"
|
||||
|
||||
@@ -26,7 +26,7 @@ const config: PlaywrightTestConfig = {
|
||||
],
|
||||
reporter: 'list',
|
||||
webServer: {
|
||||
command: 'npm run start-server-only',
|
||||
command: 'npm run start',
|
||||
port: 3000,
|
||||
timeout: 120000,
|
||||
reuseExistingServer: !process.env.CI
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"prepackage": "npm run build",
|
||||
"package": "../../node_modules/.bin/webpack",
|
||||
"prepublishOnly": "npm run package",
|
||||
"start-server-only": "node ../../demo/start-server-only"
|
||||
"start": "node ../../demo/start"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@xterm/xterm": "^5.4.0"
|
||||
|
||||
@@ -26,7 +26,7 @@ const config: PlaywrightTestConfig = {
|
||||
],
|
||||
reporter: 'list',
|
||||
webServer: {
|
||||
command: 'npm run start-server-only',
|
||||
command: 'npm run start',
|
||||
port: 3000,
|
||||
timeout: 120000,
|
||||
reuseExistingServer: !process.env.CI
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"prepackage": "npm run build",
|
||||
"package": "../../node_modules/.bin/webpack",
|
||||
"prepublishOnly": "npm run package",
|
||||
"start-server-only": "node ../../demo/start-server-only"
|
||||
"start": "node ../../demo/start"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@xterm/xterm": "^5.0.0"
|
||||
|
||||
@@ -26,7 +26,7 @@ const config: PlaywrightTestConfig = {
|
||||
],
|
||||
reporter: 'list',
|
||||
webServer: {
|
||||
command: 'npm run start-server-only',
|
||||
command: 'npm run start',
|
||||
port: 3000,
|
||||
timeout: 120000,
|
||||
reuseExistingServer: !process.env.CI
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"prepackage": "../../node_modules/.bin/tsc -p .",
|
||||
"package": "../../node_modules/.bin/webpack",
|
||||
"prepublishOnly": "npm run package",
|
||||
"start-server-only": "node ../../demo/start-server-only"
|
||||
"start": "node ../../demo/start"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@xterm/xterm": "^5.2.0"
|
||||
|
||||
@@ -26,7 +26,7 @@ const config: PlaywrightTestConfig = {
|
||||
],
|
||||
reporter: 'list',
|
||||
webServer: {
|
||||
command: 'npm run start-server-only',
|
||||
command: 'npm run start',
|
||||
port: 3000,
|
||||
timeout: 120000,
|
||||
reuseExistingServer: !process.env.CI
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"prepackage": "../../node_modules/.bin/tsc -p .",
|
||||
"package": "../../node_modules/.bin/webpack",
|
||||
"prepublishOnly": "npm run package",
|
||||
"start-server-only": "node ../../demo/start-server-only"
|
||||
"start": "node ../../demo/start"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@xterm/xterm": "^5.0.0"
|
||||
|
||||
@@ -26,7 +26,7 @@ const config: PlaywrightTestConfig = {
|
||||
],
|
||||
reporter: 'list',
|
||||
webServer: {
|
||||
command: 'npm run start-server-only',
|
||||
command: 'npm run start',
|
||||
port: 3000,
|
||||
timeout: 120000,
|
||||
reuseExistingServer: !process.env.CI
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"prepackage": "npm run build",
|
||||
"package": "../../node_modules/.bin/webpack",
|
||||
"prepublishOnly": "npm run package",
|
||||
"start-server-only": "node ../../demo/start-server-only",
|
||||
"start": "node ../../demo/start",
|
||||
"benchmark": "NODE_PATH=../../out:./out:./out-benchmark/ ../../node_modules/.bin/xterm-benchmark -r 5 -c benchmark/benchmark.json",
|
||||
"benchmark-baseline": "NODE_PATH=../../out:./out:./out-benchmark/ ../../node_modules/.bin/xterm-benchmark -r 5 -c benchmark/benchmark.json --baseline out-benchmark/benchmark/*benchmark.js",
|
||||
"benchmark-eval": "NODE_PATH=../../out:./out:./out-benchmark/ ../../node_modules/.bin/xterm-benchmark -r 5 -c benchmark/benchmark.json --eval out-benchmark/benchmark/*benchmark.js"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
import type { IBuffer, IBufferCell, IBufferRange, ITerminalAddon, Terminal } from '@xterm/xterm';
|
||||
import type { IHTMLSerializeOptions, SerializeAddon as ISerializeApi, ISerializeOptions, ISerializeRange } from '@xterm/addon-serialize';
|
||||
import { DEFAULT_ANSI_COLORS } from 'browser/services/ThemeService';
|
||||
import { IAttributeData, IColor } from 'common/Types';
|
||||
import { DEFAULT_ANSI_COLORS } from 'browser/Types';
|
||||
|
||||
function constrain(value: number, low: number, high: number): number {
|
||||
return Math.max(low, Math.min(value, high));
|
||||
|
||||
@@ -26,7 +26,7 @@ const config: PlaywrightTestConfig = {
|
||||
],
|
||||
reporter: 'list',
|
||||
webServer: {
|
||||
command: 'npm run start-server-only',
|
||||
command: 'npm run start',
|
||||
port: 3000,
|
||||
timeout: 120000,
|
||||
reuseExistingServer: !process.env.CI
|
||||
|
||||
@@ -7,7 +7,7 @@ import { perfContext, before, ThroughputRuntimeCase } from 'xterm-benchmark';
|
||||
|
||||
import { spawn } from 'node-pty';
|
||||
import { Utf8ToUtf32, stringFromCodePoint } from 'common/input/TextDecoder';
|
||||
import { Terminal } from 'browser/Terminal';
|
||||
import { CoreBrowserTerminal } from 'browser/CoreBrowserTerminal';
|
||||
import { UnicodeGraphemeProvider } from 'UnicodeGraphemeProvider';
|
||||
|
||||
|
||||
@@ -54,9 +54,9 @@ perfContext('Terminal: ls -lR /usr/lib', () => {
|
||||
});
|
||||
|
||||
perfContext('write/string/async', () => {
|
||||
let terminal: Terminal;
|
||||
let terminal: CoreBrowserTerminal;
|
||||
before(() => {
|
||||
terminal = new Terminal({ cols: 80, rows: 25, scrollback: 1000 });
|
||||
terminal = new CoreBrowserTerminal({ cols: 80, rows: 25, scrollback: 1000 });
|
||||
fakedAddonLoad(terminal);
|
||||
});
|
||||
new ThroughputRuntimeCase('', async () => {
|
||||
@@ -66,9 +66,9 @@ perfContext('Terminal: ls -lR /usr/lib', () => {
|
||||
});
|
||||
|
||||
perfContext('write/Utf8/async', () => {
|
||||
let terminal: Terminal;
|
||||
let terminal: CoreBrowserTerminal;
|
||||
before(() => {
|
||||
terminal = new Terminal({ cols: 80, rows: 25, scrollback: 1000 });
|
||||
terminal = new CoreBrowserTerminal({ cols: 80, rows: 25, scrollback: 1000 });
|
||||
});
|
||||
new ThroughputRuntimeCase('', async () => {
|
||||
await new Promise<void>(res => terminal.write(content, res));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user