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                                ...           5 years ago
Maintainers (2)
Downloads
Today 8
This Week 319
This Month 1,518
Last Day 203
Last Week 620
Last Month 2,278
Dependencies (2)
Dev Dependencies (2)
Dependents (669)

Copyright 2014 - 2016 © taobao.org |