Skip to content

Commit

Permalink
Updated to gulp@4 and lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicjansma committed Aug 20, 2020
1 parent 3b86cf9 commit 96de997
Show file tree
Hide file tree
Showing 9 changed files with 5,295 additions and 822 deletions.
6 changes: 4 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
//

// disabled for use of _jQuery
"no-underscore-dangle": 0
"no-underscore-dangle": 0,
"no-prototype-builtins": 0,
"no-control-regex": 0
}
}
}
2 changes: 1 addition & 1 deletion dist/resourcetiming-compression.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/resourcetiming-decompression.min.js

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
var fs = require("fs");

gulp.task("lint", function() {
gulp.src(["*.js", "src/*.js", "test/*.js"])
return gulp.src(["*.js", "src/*.js", "test/*.js"])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task("lint:build", function() {
gulp.src(["*.js", "src/*.js", "test/*.js"])
return gulp.src(["*.js", "src/*.js", "test/*.js"])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.format("checkstyle", fs.createWriteStream("eslint.xml")));
});

gulp.task("compress", function() {
gulp.src("src/*.js")
return gulp.src("src/*.js")
.pipe(rename({
suffix: ".min"
}))
Expand All @@ -41,26 +41,26 @@
.pipe(mocha());
});

gulp.task("mocha-tap", ["mocha"], function() {
gulp.task("mocha-tap", gulp.series("mocha", function() {
return gulp.src("test/test-*.js",
{
read: false
})
.pipe(mocha({
reporter: "tap",
output: "./test/mocha.tap"
}));
});
.pipe(mocha({
reporter: "tap",
output: "./test/mocha.tap"
}));
}));

gulp.task("karma", ["mocha", "mocha-tap"], function(done) {
gulp.task("karma", gulp.series("mocha", "mocha-tap", function(done) {
new Server({
configFile: path.join(__dirname, "karma.config.js"),
singleRun: true
}, done).start();
});
}));

gulp.task("all", ["default"]);
gulp.task("test", ["mocha", "mocha-tap", "karma"]);
gulp.task("default", ["lint", "lint:build", "compress", "test"]);
gulp.task("travis", ["default"]);
gulp.task("test", gulp.series("mocha", "mocha-tap", "karma"));
gulp.task("default", gulp.series("lint", "lint:build", "compress", "test"));
gulp.task("all", gulp.series("default"));
gulp.task("travis", gulp.series("default"));
}());
Loading

0 comments on commit 96de997

Please sign in to comment.