Skip to content

Commit

Permalink
Fixed potential security vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
GinMu committed Dec 29, 2018
1 parent 51072f4 commit bc0cd41
Show file tree
Hide file tree
Showing 4 changed files with 4,328 additions and 2,595 deletions.
29 changes: 2 additions & 27 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const mocha = require('gulp-mocha');
const gutil = require('gulp-util');
const istanbul = require('gulp-istanbul');
const babel = require('gulp-babel');
const isparta = require('isparta');

gulp.task('eslint', function () {
return gulp.src(['src/**/*.js', 'lib/**/*.js'])
Expand All @@ -13,14 +9,6 @@ gulp.task('eslint', function () {
.pipe(eslint.failAfterError());
});

gulp.task('pre-test', function () {
return gulp.src(['src/**/*.js', 'lib/**/*.js'])
.pipe(istanbul({
instrumenter: isparta.Instrumenter
}))
.pipe(istanbul.hookRequire());
});

gulp.task('build', function () {
return gulp.src('src/**/*.js')
.pipe(babel({
Expand All @@ -39,22 +27,9 @@ gulp.task('build', function () {
.pipe(gulp.dest('dist/'))
})

gulp.task('test', ['pre-test'], function () {
return gulp.src(['test/*.js'])
.pipe(mocha())
.pipe(istanbul.writeReports())
.pipe(istanbul.enforceThresholds({
thresholds: {
global: 85
}
}))
.on('error', gutil.log);
});

gulp.task('watch', function () {
gulp.watch(['src/**/*.js', 'lib/**/*.js', 'src/test/*.js'], ['test']);
gulp.watch(['src/**/*.js', 'lib/**/*.js'], ['eslint']);
})

gulp.task('default', ['eslint', 'test']);
gulp.task('dev', ['eslint', 'test', 'watch']);
gulp.task('default', gulp.parallel('eslint'));
gulp.task('dev', gulp.parallel('watch', 'eslint'));
Loading

0 comments on commit bc0cd41

Please sign in to comment.