split file to multiple for gulp
First, install gulp-file-split as a development dependency:
npm install --save-dev gulp-file-splitThen, add it to your gulpfile.js:
var gsplit = require('gulp-file-split');
gulp.task('split', function() {
gulp.src('file.txt')
.pipe(gsplit({
suffix: 'resource_',
ext: 'txt',
count: 3
}))
.pipe(gulp.dest('tmp'));
});Type: Object
Type: String
Default: file_
the sub file prefix name
Type: Integer
The number to be divided sub file
Type: String
Default: txt
the sub file suffix name