How does gulp monitor the status of gulp.dest file copy completion?

After the

copy task is completed, the files in the proDir will be manipulated later. However, subsequent operations often fail because the copy of the file has not been completed.
how should I monitor the status of the completion of the dest copy?

gulp.task("copy",["clear"],function(cb){
    const dirs = getFolders(srcDir)
    dirs.map( (dir,index) =>{
        const commons = gulp.src([devDir,`!${path.join(__dirname, "../dev/config.js")}`,`!${path.join(__dirname, "../dev/project.config.json")}`])
        const configs = gulp.src(path.join(srcDir,dir,"/**"))
        return merge(commons,configs).pipe(gulp.dest(path.join(proDir,dir)))
    })
})
Mar.03,2021

you can listen to finish events, and then do subsequent operations


gulp itself executes tasks in no order. It is recommended that you install gulp-sequence and check the npm official website, which is a plug-in that can define the order of gulp execution

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb10e3-4f7f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb10e3-4f7f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?