gulp-file-split

0.0.4 • Public • Published

gulp-file-split

split file to multiple for gulp

Usage

First, install gulp-file-split as a development dependency:

npm install --save-dev gulp-file-split

Then, 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'));
});

API

gsplit(options)

options

Type: Object

options.prefix

Type: String
Default: file_

the sub file prefix name

options.count

Type: Integer

The number to be divided sub file

options.ext

Type: String
Default: txt

the sub file suffix name

Dependents (0)

Package Sidebar

Install

npm i gulp-file-split

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • kebingzao