1
Good evening, I would like to know how to update this code snippet from Gulp 3 to Gulp 4. Everything before worked perfectly, I was updating the lib for vulnerabilities and now appears the following error: (I could not understand the documentation migration)
const gulp = require('gulp');
const clean = require('gulp-clean');
const ts = require('gulp-typescript');
const tsProject = ts.createProject('tsconfig.json');
gulp.task('scripts', ['static'], () => {
const tsResult = tsProject.src()
.pipe(tsProject());
return tsResult.js
.pipe(gulp.dest('dist'));
});
gulp.task('static', ['clean'], () => {
return gulp
.src(['src/**/*.json'])
.pipe(gulp.dest('dist'));
});
gulp.task('clean', () => {
return gulp
.src('dist')
.pipe(clean());
});
gulp.task('build', ['scripts']);
gulp.task('watch', ['build'], () => {
return gulp.watch(['src/**/*.js', 'src/**/*.json'], ['build']);
});
gulp.task('default', ['watch']);