@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
File diff suppressed because one or more lines are too long
-25
@@ -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');
|
||||||
@@ -141,27 +139,12 @@ gulp.task('browserify-addons', ['tsc'], function() {
|
|||||||
return merge(...bundles);
|
return merge(...bundles);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('instrument-test', function () {
|
|
||||||
return gulp.src([`${outDir}/**/*.js`])
|
|
||||||
// Covering files
|
|
||||||
.pipe(istanbul())
|
|
||||||
// Force `require` to return covered files
|
|
||||||
.pipe(istanbul.hookRequire());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('mocha', function () {
|
gulp.task('mocha', function () {
|
||||||
return gulp.src(TEST_PATHS, {read: false})
|
return gulp.src(TEST_PATHS, {read: false})
|
||||||
.pipe(mocha())
|
.pipe(mocha())
|
||||||
.once('error', () => process.exit(1));
|
.once('error', () => process.exit(1));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('mocha-coverage', ['instrument-test'], function () {
|
|
||||||
return gulp.src(TEST_PATHS, {read: false})
|
|
||||||
.pipe(mocha())
|
|
||||||
.once('error', () => process.exit(1))
|
|
||||||
.pipe(istanbul.writeReports());
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run single test suite (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-suite --test InputHandler.test
|
* gulp mocha-suite --test InputHandler.test
|
||||||
@@ -203,14 +186,6 @@ gulp.task('watch', ['webpack'], () => {
|
|||||||
gulp.watch(['./src/*', './src/**/*'], ['webpack']);
|
gulp.watch(['./src/*', './src/**/*'], ['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']);
|
||||||
|
|||||||
+3
-4
@@ -21,8 +21,6 @@
|
|||||||
"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",
|
||||||
@@ -33,6 +31,7 @@
|
|||||||
"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",
|
||||||
@@ -50,13 +49,13 @@
|
|||||||
"test": "npm-run-all mocha lint",
|
"test": "npm-run-all mocha lint",
|
||||||
"test-debug": "node --inspect-brk node_modules/.bin/gulp test",
|
"test-debug": "node --inspect-brk node_modules/.bin/gulp test",
|
||||||
"test-suite": "gulp mocha-suite --test",
|
"test-suite": "gulp mocha-suite --test",
|
||||||
"test-coverage": "gulp mocha-coverage",
|
"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",
|
||||||
"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": "gulp watch"
|
"watch": "gulp watch"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user