vinyl-buffer
Convert streaming vinyl files to use buffers
Last updated a year ago by phated .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (a year ago)

3 Versions

  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           5 years ago
  • 0.0.0                                ...           5 years ago
Maintainers (2)
Downloads
Today 1
This Week 1
This Month 1,837
Last Day 20
Last Week 537
Last Month 1,517
Dependencies (2)
Dev Dependencies (2)
Dependents (650)

Copyright 2014 - 2016 © taobao.org |