Merge branch 'master' into passive-events
This commit is contained in:
+2
-1
@@ -18,7 +18,8 @@ fixtures/typings-test/*.js
|
|||||||
package-lock.json
|
package-lock.json
|
||||||
|
|
||||||
# Directories needed for code coverage
|
# Directories needed for code coverage
|
||||||
/coverage/
|
coverage/
|
||||||
|
.nyc_output/
|
||||||
|
|
||||||
# Keep bundled code out of Git
|
# Keep bundled code out of Git
|
||||||
dist/
|
dist/
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ env:
|
|||||||
matrix:
|
matrix:
|
||||||
- NPM_COMMAND=tsc
|
- NPM_COMMAND=tsc
|
||||||
- NPM_COMMAND=lint
|
- NPM_COMMAND=lint
|
||||||
- NPM_COMMAND=test
|
- NPM_COMMAND=test-coverage
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
script: npm run $NPM_COMMAND
|
script: npm run $NPM_COMMAND
|
||||||
|
|||||||
Vendored
-23
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Mocha Tests",
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/mocha",
|
|
||||||
"windows": {
|
|
||||||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/mocha.cmd"
|
|
||||||
},
|
|
||||||
"runtimeArgs": [
|
|
||||||
"--colors",
|
|
||||||
"--recursive",
|
|
||||||
"${workspaceRoot}/lib"
|
|
||||||
],
|
|
||||||
"sourceMaps": true,
|
|
||||||
"outFiles": [ "${workspaceRoot}/lib/**/*.js" ],
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Vendored
-8
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"search.exclude": {
|
|
||||||
"**/node_modules": true,
|
|
||||||
"**/dist": true,
|
|
||||||
"**/build": true,
|
|
||||||
"**/lib": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -150,6 +150,8 @@ computational environment for Jupyter, supporting interactive data science and s
|
|||||||
- [**Hyper**](https://hyper.is): A terminal built on web technologies
|
- [**Hyper**](https://hyper.is): A terminal built on web technologies
|
||||||
- [**Diag**](https://diag.ai): A better way to troubleshoot problems faster. Capture, share and reapply troubleshooting knowledge so you can focus on solving problems that matter.
|
- [**Diag**](https://diag.ai): A better way to troubleshoot problems faster. Capture, share and reapply troubleshooting knowledge so you can focus on solving problems that matter.
|
||||||
- [**GoTTY**](https://github.com/yudai/gotty): A simple command line tool that shares your terminal as a web application based on xterm.js.
|
- [**GoTTY**](https://github.com/yudai/gotty): A simple command line tool that shares your terminal as a web application based on xterm.js.
|
||||||
|
- [**genact**](https://github.com/svenstaro/genact): A nonsense activity generator.
|
||||||
|
|
||||||
|
|
||||||
Do you use xterm.js in your application as well? Please [open a Pull Request](https://github.com/sourcelair/xterm.js/pulls) to include it here. We would love to have it in our list.
|
Do you use xterm.js in your application as well? Please [open a Pull Request](https://github.com/sourcelair/xterm.js/pulls) to include it here. We would love to have it in our list.
|
||||||
|
|
||||||
@@ -224,6 +226,16 @@ Then open http://127.0.0.1:3000 in a web browser to access the demo.
|
|||||||
|
|
||||||
*Note: Do not use ConEmu, as it seems to break the demo for some reason.*
|
*Note: Do not use ConEmu, as it seems to break the demo for some reason.*
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
Tests are run using the following npm scripts:
|
||||||
|
|
||||||
|
- `npm test`: This will run both unit tests and the linter
|
||||||
|
- `npm run test-suite <file>`: This will run all tests within a particular file, <file> is the test file name excluding the extension (eg. "Linkifier.test")
|
||||||
|
- `npm run test-debug`: This will run unit tests with `--inspect-brk`, this can then be automatically debugged using [VS Code auto attach](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_auto-attach-feature) or manually attached to by a debugger
|
||||||
|
- `npm run test-coverage`: This will run all unit tests and produce a coverage report
|
||||||
|
- `npm run lint`: This will run the linter only
|
||||||
|
|
||||||
## Releases
|
## Releases
|
||||||
|
|
||||||
Xterm.js follows a monthly release cycle roughly.
|
Xterm.js follows a monthly release cycle roughly.
|
||||||
|
|||||||
+14
-32
@@ -4,11 +4,9 @@
|
|||||||
|
|
||||||
const browserify = require('browserify');
|
const browserify = require('browserify');
|
||||||
const buffer = require('vinyl-buffer');
|
const buffer = require('vinyl-buffer');
|
||||||
const coveralls = require('gulp-coveralls');
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const istanbul = require('gulp-istanbul');
|
|
||||||
const merge = require('merge-stream');
|
const merge = require('merge-stream');
|
||||||
const mocha = require('gulp-mocha');
|
const mocha = require('gulp-mocha');
|
||||||
const sorcery = require('sorcery');
|
const sorcery = require('sorcery');
|
||||||
@@ -25,6 +23,13 @@ let outDir = tsProject.config.compilerOptions.outDir;
|
|||||||
|
|
||||||
const addons = fs.readdirSync(`${__dirname}/src/addons`);
|
const addons = fs.readdirSync(`${__dirname}/src/addons`);
|
||||||
|
|
||||||
|
const TEST_PATHS = [
|
||||||
|
`${outDir}/*test.js`,
|
||||||
|
`${outDir}/**/*test.js`,
|
||||||
|
`${outDir}/*integration.js`,
|
||||||
|
`${outDir}/**/*integration.js`
|
||||||
|
];
|
||||||
|
|
||||||
// Under some environments like TravisCI, this comes out at absolute which can
|
// Under some environments like TravisCI, this comes out at absolute which can
|
||||||
// break the build. This ensures that the outDir is absolute.
|
// break the build. This ensures that the outDir is absolute.
|
||||||
if (path.normalize(outDir).indexOf(__dirname) !== 0) {
|
if (path.normalize(outDir).indexOf(__dirname) !== 0) {
|
||||||
@@ -95,37 +100,22 @@ gulp.task('browserify-addons', function() {
|
|||||||
return merge(...bundles);
|
return merge(...bundles);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('instrument-test', function () {
|
gulp.task('mocha', function () {
|
||||||
return gulp.src([`${outDir}/**/*.js`])
|
return gulp.src(TEST_PATHS, {read: false})
|
||||||
// Covering files
|
|
||||||
.pipe(istanbul())
|
|
||||||
// Force `require` to return covered files
|
|
||||||
.pipe(istanbul.hookRequire());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('mocha', ['instrument-test'], function () {
|
|
||||||
return gulp.src([
|
|
||||||
`${outDir}/*test.js`,
|
|
||||||
`${outDir}/**/*test.js`,
|
|
||||||
`${outDir}/*integration.js`,
|
|
||||||
`${outDir}/**/*integration.js`
|
|
||||||
], {read: false})
|
|
||||||
.pipe(mocha())
|
.pipe(mocha())
|
||||||
.once('error', () => process.exit(1))
|
.once('error', () => process.exit(1));
|
||||||
.pipe(istanbul.writeReports());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run single test file by file name(without file extension). Example of the command:
|
* Run single test suite (file) by file name (without file extension). Example of the command:
|
||||||
* gulp mocha-test --test InputHandler.test
|
* gulp mocha-suite --test InputHandler.test
|
||||||
*/
|
*/
|
||||||
gulp.task('mocha-test', ['instrument-test'], function () {
|
gulp.task('mocha-suite', [], function () {
|
||||||
let testName = util.env.test;
|
let testName = util.env.test;
|
||||||
util.log("Run test by Name: " + testName);
|
util.log("Run test by Name: " + testName);
|
||||||
return gulp.src([`${outDir}/${testName}.js`, `${outDir}/**/${testName}.js`], {read: false})
|
return gulp.src([`${outDir}/${testName}.js`, `${outDir}/**/${testName}.js`], {read: false})
|
||||||
.pipe(mocha())
|
.pipe(mocha())
|
||||||
.once('error', () => process.exit(1))
|
.once('error', () => process.exit(1));
|
||||||
.pipe(istanbul.writeReports());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -158,14 +148,6 @@ gulp.task('watch-demo', ['webpack'], () => {
|
|||||||
gulp.watch(['./demo/*', './lib/**/*'], ['webpack']);
|
gulp.watch(['./demo/*', './lib/**/*'], ['webpack']);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* Submit coverage results to coveralls.io
|
|
||||||
*/
|
|
||||||
gulp.task('coveralls', function () {
|
|
||||||
gulp.src('coverage/**/lcov.info')
|
|
||||||
.pipe(coveralls());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('build', ['sorcery', 'sorcery-addons']);
|
gulp.task('build', ['sorcery', 'sorcery-addons']);
|
||||||
gulp.task('test', ['mocha']);
|
gulp.task('test', ['mocha']);
|
||||||
gulp.task('default', ['build']);
|
gulp.task('default', ['build']);
|
||||||
|
|||||||
+8
-5
@@ -9,12 +9,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "^3.4.34",
|
"@types/chai": "^3.4.34",
|
||||||
"@types/glob": "^5.0.35",
|
"@types/glob": "^5.0.35",
|
||||||
"@types/jsdom": "^11.0.1",
|
"@types/jsdom": "11.0.1",
|
||||||
"@types/mocha": "^2.2.33",
|
"@types/mocha": "^2.2.33",
|
||||||
"@types/node": "6.0.108",
|
"@types/node": "6.0.108",
|
||||||
"browserify": "^13.3.0",
|
"browserify": "^13.3.0",
|
||||||
"chai": "3.5.0",
|
"chai": "3.5.0",
|
||||||
"concurrently": "^3.5.1",
|
"concurrently": "^3.5.1",
|
||||||
|
"coveralls": "^3.0.1",
|
||||||
"express": "4.13.4",
|
"express": "4.13.4",
|
||||||
"express-ws": "2.0.0-rc.1",
|
"express-ws": "2.0.0-rc.1",
|
||||||
"fs-extra": "^1.0.0",
|
"fs-extra": "^1.0.0",
|
||||||
@@ -22,18 +23,17 @@
|
|||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-cli": "^1.2.2",
|
"gulp-cli": "^1.2.2",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
"gulp-coveralls": "^0.1.4",
|
|
||||||
"gulp-istanbul": "^1.1.1",
|
|
||||||
"gulp-mocha": "^3.0.1",
|
"gulp-mocha": "^3.0.1",
|
||||||
"gulp-sourcemaps": "1.9.1",
|
"gulp-sourcemaps": "1.9.1",
|
||||||
"gulp-typescript": "^3.1.3",
|
"gulp-typescript": "^3.1.3",
|
||||||
"gulp-util": "3.0.8",
|
"gulp-util": "3.0.8",
|
||||||
"jsdoc": "3.4.3",
|
"jsdoc": "3.4.3",
|
||||||
"jsdom": "^11.1.0",
|
"jsdom": "^11.11.0",
|
||||||
"merge-stream": "^1.0.1",
|
"merge-stream": "^1.0.1",
|
||||||
"node-pty": "^0.7.2",
|
"node-pty": "^0.7.2",
|
||||||
"nodemon": "1.10.2",
|
"nodemon": "1.10.2",
|
||||||
"npm-run-all": "^4.1.2",
|
"npm-run-all": "^4.1.2",
|
||||||
|
"nyc": "^11.8.0",
|
||||||
"sorcery": "^0.10.0",
|
"sorcery": "^0.10.0",
|
||||||
"tslint": "^5.9.1",
|
"tslint": "^5.9.1",
|
||||||
"tslint-consistent-codestyle": "^1.13.0",
|
"tslint-consistent-codestyle": "^1.13.0",
|
||||||
@@ -49,13 +49,16 @@
|
|||||||
"start-zmodem": "node demo/zmodem/app",
|
"start-zmodem": "node demo/zmodem/app",
|
||||||
"lint": "tslint 'src/**/*.ts'",
|
"lint": "tslint 'src/**/*.ts'",
|
||||||
"test": "npm-run-all mocha lint",
|
"test": "npm-run-all mocha lint",
|
||||||
|
"test-debug": "node --inspect-brk node_modules/.bin/gulp test",
|
||||||
|
"test-suite": "gulp mocha-suite --test",
|
||||||
|
"test-coverage": "nyc -x gulpfile.js -x '**/*test*' npm run mocha",
|
||||||
"mocha": "gulp test",
|
"mocha": "gulp test",
|
||||||
"build:docs": "jsdoc -c jsdoc.json",
|
"build:docs": "jsdoc -c jsdoc.json",
|
||||||
"tsc": "tsc",
|
"tsc": "tsc",
|
||||||
"prebuild": "concurrently --kill-others-on-fail --names \"lib,attach,fit,fullscreen,search,terminado,webLinks,winptyCompat,zmodem,css\" \"tsc\" \"tsc -p ./src/addons/attach\" \"tsc -p ./src/addons/fit\" \"tsc -p ./src/addons/fullscreen\" \"tsc -p ./src/addons/search\" \"tsc -p ./src/addons/terminado\" \"tsc -p ./src/addons/webLinks\" \"tsc -p ./src/addons/winptyCompat\" \"tsc -p ./src/addons/zmodem\" \"gulp css\"",
|
"prebuild": "concurrently --kill-others-on-fail --names \"lib,attach,fit,fullscreen,search,terminado,webLinks,winptyCompat,zmodem,css\" \"tsc\" \"tsc -p ./src/addons/attach\" \"tsc -p ./src/addons/fit\" \"tsc -p ./src/addons/fullscreen\" \"tsc -p ./src/addons/search\" \"tsc -p ./src/addons/terminado\" \"tsc -p ./src/addons/webLinks\" \"tsc -p ./src/addons/winptyCompat\" \"tsc -p ./src/addons/zmodem\" \"gulp css\"",
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"prepublish": "npm run build",
|
"prepublish": "npm run build",
|
||||||
"coveralls": "gulp coveralls",
|
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
||||||
"webpack": "gulp webpack",
|
"webpack": "gulp webpack",
|
||||||
"watch": "concurrently --kill-others-on-fail --names \"lib,attach,fit,fullscreen,search,terminado,webLinks,winptyCompat,zmodem,css\" \"tsc -w\" \"tsc -w -p ./src/addons/attach\" \"tsc -w -p ./src/addons/fit\" \"tsc -w -p ./src/addons/fullscreen\" \"tsc -w -p ./src/addons/search\" \"tsc -w -p ./src/addons/terminado\" \"tsc -w -p ./src/addons/webLinks\" \"tsc -w -p ./src/addons/winptyCompat\" \"tsc -w -p ./src/addons/zmodem\" \"gulp watch-css\""
|
"watch": "concurrently --kill-others-on-fail --names \"lib,attach,fit,fullscreen,search,terminado,webLinks,winptyCompat,zmodem,css\" \"tsc -w\" \"tsc -w -p ./src/addons/attach\" \"tsc -w -p ./src/addons/fit\" \"tsc -w -p ./src/addons/fullscreen\" \"tsc -w -p ./src/addons/search\" \"tsc -w -p ./src/addons/terminado\" \"tsc -w -p ./src/addons/webLinks\" \"tsc -w -p ./src/addons/winptyCompat\" \"tsc -w -p ./src/addons/zmodem\" \"gulp watch-css\""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user