vinyl-buffer
Convert streaming vinyl files to use buffers
Last updated 7 years ago by phated .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install vinyl-buffer 
SYNC missed versions from official npm registry.

vinyl-buffer Flattr this!experimental

Convert streaming vinyl files to use buffers.

An alternative to gulp-streamify that you can pipe to, instead of being required to wrap your streams.

var browserify = require('browserify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var uglify = require('gulp-uglify')
var size = require('gulp-size')
var gulp = require('gulp')

gulp.task('build', function() {
  var bundler = browserify('./index.js')

  return bundler.bundle()
    .pipe(source('index.js'))
    .pipe(buffer())
    .pipe(uglify())
    .pipe(size())
    .pipe(gulp.dest('dist/'))
})

Usage

vinyl-buffer

vinylBuffer()

Creates a transform stream that takes vinyl files as input, and outputs modified vinyl files as output. If file.isStream(), file.contents will be converted to a Buffer before being emitted again – otherwise, the file will be emitted immediately.

License

MIT. See LICENSE.md for details.

Current Tags

  • 1.0.1                                ...           latest (7 years ago)

3 Versions

  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           10 years ago
  • 0.0.0                                ...           11 years ago
Maintainers (2)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE