vinyl-buffer
Convert streaming vinyl files to use buffers
Last updated 2 years 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 (2 years ago)

3 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.0                                ...           6 years ago
Maintainers (2)
Downloads
Today 133
This Week 293
This Month 909
Last Day 160
Last Week 561
Last Month 2,518
Dependencies (2)
Dev Dependencies (2)
Dependents (679)

Copyright 2014 - 2016 © taobao.org |