node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

gulp-recursive-concat

Gulp Recursive Concatenation NPM version Build Status

A gulp plugin for Recursive Concatenation

Getting Started

Install:

npm install --save-dev gulp-recursive-concat

How to use:

    var recursiveConcat = require('gulp-recursive-concat');
 
    gulp.task('concatenation', function(){
        return gulp.src('source/**/*.js')
        .pipe(recursiveConcat({extname: ".js"}))
        .pipe(gulp.dest('dist/'));
});

from

├── source
|   └── modules
|   |   └── 1.js
|   |   └── 2.js

to

├── dist
|   └── modules
|   |   └── modules.js

With outside options:

    var recursiveConcat = require('gulp-recursive-concat');
    
    gulp.task('concatenation', function(){
        return gulp.src('source/**/*.js')
        .pipe(recursiveConcat({extname: ".js", outside: true}))
        .pipe(gulp.dest('dist/'));
});

from

├── source
|   └── modules
|   |   └── 1.js
|   |   └── 2.js

to

├── dist
|   └── modules.js