Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade lodash and gulp #12

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["es2015"]
"presets": ["env"]
}
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
language: node_js
node_js:
- "4"
- "5"
- "6"
- "7"
- "8"
- "10"
- "12"
install:
- yarn install
script:
Expand Down
23 changes: 9 additions & 14 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import eslint from 'gulp-eslint';
import babel from 'gulp-babel';
import plumber from 'gulp-plumber';
import istanbul from 'gulp-babel-istanbul';
import util from 'gulp-util';
import log from 'fancy-log';
import del from 'del';
import Instrumenter from 'isparta';
import runSequence from 'run-sequence';

const paths = {
sourceFiles: ['src/**/*.js'],
Expand All @@ -21,9 +20,7 @@ paths.buildFiles = [`${paths.buildDir}/**/*.js`];
/**
* Task to remove assets from last build
*/
gulp.task('clean', (done) => {
del(['build', 'coverage'], done);
});
gulp.task('clean', () => del(['build', 'coverage']));

/**
* Task to lint the src files
Expand All @@ -46,7 +43,7 @@ gulp.task('build', () => (
}))
.pipe(sourcemaps.write())
.pipe(gulp.dest(paths.buildDir))
.on('error', util.log)
.on('error', log)
));

/**
Expand All @@ -72,7 +69,7 @@ gulp.task('test', () => (
require: 'babel-register',
reporter: 'list',
}))
.on('error', util.log)
.on('error', log)
));

gulp.task('coverage:report', () => (
Expand All @@ -90,12 +87,10 @@ gulp.task('coverage:report', () => (
},
}))
.pipe(istanbul.enforceThresholds({ thresholds: { global: 10 } }))
.on('error', util.log)
.on('error', log)
));

gulp.task('test:coverage', done => (
runSequence('coverage:instrument', 'test', 'coverage:report', done)
));
gulp.task('test:coverage', gulp.series('coverage:instrument', 'test', 'coverage:report'));

/**
* Task to watch the files whilst developing
Expand All @@ -105,6 +100,6 @@ gulp.task('watch', () => (
));


gulp.task('prebuild', ['clean', 'lint', 'test:coverage']);
gulp.task('default', ['prebuild', 'build']);
gulp.task('prepublish', ['default']);
gulp.task('prebuild', gulp.series('clean', 'lint', 'test:coverage'));
gulp.task('default', gulp.series('prebuild', 'build'));
gulp.task('prepare', gulp.series('default'));
Loading