Skip to content

Commit 72cd722

Browse files
committed
migrate scripts from gulp 3 to gulp 4
1 parent 6b7a103 commit 72cd722

File tree

3 files changed

+31
-41
lines changed

3 files changed

+31
-41
lines changed

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
33
- 10.16.0
4-
# - stable
4+
- stable
55
before_install:
66
- npm install -g codeclimate-test-reporter
77
after_success:

Diff for: gulpfile.js

+27-37
Original file line numberDiff line numberDiff line change
@@ -149,46 +149,36 @@ gulp.task("build-test", function() {
149149
.pipe(gulp.dest("test/"));
150150
});
151151

152-
gulp.task("test", [ "istanbul:hook" ], function() {
153-
return gulp.src([
154-
"node_modules/reflect-metadata/Reflect.js",
155-
"test/**/*.test.js"
156-
])
157-
.pipe(mocha({ui: "bdd"}))
158-
.on("error", function (err) {
159-
process.exit(1);
160-
})
161-
.pipe(istanbul.writeReports());
162-
});
163-
164152
gulp.task("istanbul:hook", function() {
165-
return gulp.src(["src/**/*.js"])
166-
.pipe(istanbul())
167-
.pipe(sourcemaps.write("."))
168-
.pipe(istanbul.hookRequire());
153+
return gulp.src(["src/**/*.js"])
154+
.pipe(istanbul())
155+
.pipe(sourcemaps.write("."))
156+
.pipe(istanbul.hookRequire());
169157
});
158+
159+
gulp.task("test", gulp.series(["istanbul:hook"]), function () {
160+
return gulp.src([
161+
"node_modules/reflect-metadata/Reflect.js",
162+
"test/**/*.test.js"
163+
])
164+
.pipe(mocha({ui: "bdd"}))
165+
.on("error", function (err) {
166+
process.exit(1);
167+
})
168+
.pipe(istanbul.writeReports()
169+
);
170+
});
171+
170172

171173
//******************************************************************************
172174
//* DEFAULT
173175
//******************************************************************************
174-
gulp.task("build", function(cb) {
175-
runSequence(
176-
"lint",
177-
[
178-
"build-src",
179-
"build-es",
180-
"build-lib",
181-
"build-amd",
182-
"build-dts"
183-
],
184-
"build-test", cb
185-
);
186-
});
187-
188-
gulp.task("default", function (cb) {
189-
runSequence(
190-
"clean",
191-
"build",
192-
"test",
193-
cb);
194-
});
176+
gulp.task("build", gulp.series("lint",
177+
gulp.parallel("build-src", "build-es", "build-lib", "build-amd", "build-dts"),
178+
"build-test", (done) => {
179+
done();
180+
}));
181+
182+
gulp.task("default", gulp.series("clean", "build", "test", (done) => {
183+
done();
184+
}));

Diff for: package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
"@types/chai": "^4.1.7",
2929
"@types/express": "^4.17.0",
3030
"@types/mocha": "5.2.7",
31-
"@types/node": "^12.6.6",
31+
"@types/node": "^12.6.7",
3232
"@types/supertest": "2.0.8",
3333
"chai": "4.2.0",
3434
"del": "5.0.0",
35-
"gulp": "3.9.1",
35+
"gulp": "4.0.2",
3636
"gulp-istanbul": "1.1.3",
3737
"gulp-mocha": "6.0.0",
38-
"gulp-sourcemaps": "1.7.x",
38+
"gulp-sourcemaps": "2.6.x",
3939
"gulp-tslint": "8.1.4",
4040
"gulp-typescript": "5.0.1",
4141
"mocha": "6.1.4",

0 commit comments

Comments
 (0)