gulp-wrap
A gulp plugin to concat files of the directories.
Usage
Firstly, install gulp-dir-concat
as a development dependency:
npm install gulp-dir-concat --save
Then, add it into your gulpfile.js
:
concat all files according to each directory:
const dirConcat = ; gulp ;
concat the same file type of files according to each directory:
const path = ;const gulpif = ; const dirConcat = ; { return { return path === '.' + type; };}gulp ;
concat all files into only one concated file:
const dirConcat = ; gulp ;
Parameters
fileWaterMark
Type: Boolean
Default: undefined
To output the comment of the original file name into the concated result.
concateIntoOne
Type: Boolean
Default: undefined
To concat files of all directory into only one file. Or it will concat files according each directory.
fileNameHandler
Type: Function
Default: undefined
Argument: { files: [], cwd: file.cwd, base: file.base}
To change the file name of the concated file by yourself.