Gulp: Make anonymous task silent

Created on 9 Jul 2015  路  3Comments  路  Source: gulpjs/gulp

Usually I use anonymous task for sub-tasks, I want to hide these detail from gulp user,
but the gulp still notify for anonymous task, and seems no way to make it quiet.

image

How do I hide these [14:47:05] Starting '<anonymous>'... ?
What about dismiss report from anonymous task, or add a property(such as fn.silent) to task function?

here's my task definition, FYI:

gulp.task('copy', copyBootstrap())

function copyBootstrap(){

    var styl_dir = 'node_modules/bootstrap-styl/bootstrap'
    var js_dir = 'node_modules/bootstrap-styl/js'
    var dist = 'lib'

    return gulp.parallel(
        function(){
            var a = gulp.src(styl_dir + '/**/*')
                .pipe(gulp.dest(dist + '/bs-styl'))
            return a
        },
        function(){
            return gulp.src(js_dir + '/**/*')
                .pipe(gulp.dest(dist + '/bs-js'))
        }
    )

}

Most helpful comment

+1 this 'anonymous' messages is annoying

All 3 comments

For now I make a plugin to do that https://www.npmjs.com/package/gulp-all
but I think maybe anonymous task was meant to be acting like that? for doing some private even dirty works, silently.

Or when should I use anoymous task?

gulp.parallel and gulp.series are meant to build task dependency trees. If you don't want things to show up, just use plain functions and helpers libraries like async or bach.

+1 this 'anonymous' messages is annoying

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JohnAlbin picture JohnAlbin  路  5Comments

lgg picture lgg  路  3Comments

borodean picture borodean  路  5Comments

jonira picture jonira  路  3Comments

aaronroberson picture aaronroberson  路  4Comments