You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
526 B
35 lines
526 B
3 months ago
|
/**
|
||
|
* Tasks:
|
||
|
*
|
||
|
* gulp lint
|
||
|
* Checks source code
|
||
|
*
|
||
|
* gulp watch
|
||
|
* Observes changes in the code
|
||
|
*
|
||
|
* gulp
|
||
|
* Invokes both `lint` and `watch` tasks
|
||
|
*/
|
||
|
|
||
|
const gulp = require('gulp');
|
||
|
const plumber = require('gulp-plumber');
|
||
|
const eslint = require('gulp-eslint');
|
||
|
|
||
|
gulp.task('lint', () =>
|
||
|
{
|
||
|
const src =
|
||
|
[
|
||
|
'gulpfile.js',
|
||
|
'server.js',
|
||
|
'config.example.js',
|
||
|
'lib/**/*.js'
|
||
|
];
|
||
|
|
||
|
return gulp.src(src)
|
||
|
.pipe(plumber())
|
||
|
.pipe(eslint())
|
||
|
.pipe(eslint.format());
|
||
|
});
|
||
|
|
||
|
gulp.task('default', gulp.series('lint'));
|