gulp-mergedir

Merge code by directory.


Keywords
gulp-mergedir, gulp-llcowry-mergedir, llcowry, llcowry-mergedir
License
MIT
Install
npm install gulp-mergedir@1.0.0

Documentation

gulp-mergedir

Merge code by directory.

Install

$ npm install gulp-mergedir --save-dev

Example

var gulp = require('gulp');
var mergedir = require('gulp-mergedir');

gulp.task('mergedir', function() {
    return gulp
        .src('src/scripts/**/*.js')
        .pipe(mergedir({
            ext: '.js' // 输出合并的文件后缀
            mergeCommon: 'common.js', // 合并公共文件到每个子目录
            mergeFirst: true, // 是否把合并的公共文件列为首位
            sourceComments: true // 是否显示源文件信息
        }))
        .pipe(gulp.dest('dist/scripts'));
});

License

MIT.