V
V
Vladislav Bezenson2016-03-07 11:51:07
JavaScript
Vladislav Bezenson, 2016-03-07 11:51:07

How to concatenate two GULP streams?

Hey!
For example, I have this task:

function task() {
    gulp.src('libs/*.js')
        // some manipulations
        .concat('libs.js')

    gulp.src('js/*.js')
        // Another manipulations
        .concat('app.js')
}

Is it possible somehow to assemble the resulting libs.js and app.js into one on the fly inside the task? Those. do not put it somewhere in the file system, but immediately get some kind of all.js at the output.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Velichko, 2016-03-07
@Zoxon

https://github.com/osscafe/gulp-cheatsheet/raw/mas...

A
Arthur, 2016-03-07
@astralo

function task() {
    gulp.src('libs/*.js')
        // some manipulations
        .concat('libs.js')

    gulp.src('js/*.js')
        // Another manipulations
        .concat('app.js')

    gulp.src([
        'libs.js',
        'app.js'
    ])
        // Another manipulations
        .concat('bundle.js')
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question