From 91bff5c186ae0eaba58f8cf7becae35622681a67 Mon Sep 17 00:00:00 2001 From: Rob Moran Date: Sun, 11 Mar 2018 12:08:19 +0000 Subject: [PATCH 1/3] Fix latest tslint usage --- gulpfile.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 8c23359..442c2ed 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,13 +2,12 @@ var path = require("path"); var browserify = require("browserify"); var del = require("del"); var merge = require("merge2"); -var tslint = require("tslint"); var buffer = require("vinyl-buffer"); var source = require("vinyl-source-stream"); var gulp = require("gulp"); var sourcemaps = require("gulp-sourcemaps"); -var gulpTs = require("gulp-typescript"); -var gulpTslint = require("gulp-tslint"); +var typescript = require("gulp-typescript"); +var tslint = require("gulp-tslint"); var uglify = require("gulp-uglify"); // Source @@ -44,14 +43,11 @@ gulp.task("clean", () => { // Lint the source gulp.task("lint", () => { - var program = tslint.Linter.createProgram("./"); - return gulp.src(srcFiles) - .pipe(gulpTslint({ - program: program, + .pipe(tslint({ formatter: "stylish" })) - .pipe(gulpTslint.report({ + .pipe(tslint.report({ emitError: !watching })) }); @@ -60,7 +56,7 @@ gulp.task("lint", () => { gulp.task("compile", ["clean"], () => { var tsResult = gulp.src(srcFiles) .pipe(sourcemaps.init()) - .pipe(gulpTs.createProject("tsconfig.json")()) + .pipe(typescript.createProject("tsconfig.json")()) .on("error", handleError); return merge([ From 87ead6b568309ec844477588b613934cf11db725 Mon Sep 17 00:00:00 2001 From: Rob Moran Date: Sun, 11 Mar 2018 12:53:06 +0000 Subject: [PATCH 2/3] Don't delete output when watching to speed up development --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 442c2ed..f089ca8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -38,7 +38,7 @@ gulp.task("setWatch", () => { // Clear built directories gulp.task("clean", () => { - return del([nodeDir, typesDir, bundleDir]); + if (!watching) del([nodeDir, typesDir, bundleDir]); }); // Lint the source From 366dcd4b64a14dc42dda94209b2af2d7af0ad263 Mon Sep 17 00:00:00 2001 From: Rob Moran Date: Sun, 11 Mar 2018 13:09:46 +0000 Subject: [PATCH 3/3] Use latest version of webbluetooth --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a822187..502664b 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,6 @@ "typescript": "^2.6.2", "vinyl-buffer": "^1.0.1", "vinyl-source-stream": "^2.0.0", - "webbluetooth": "^1.0.2" + "webbluetooth": "^1.0.4" } }