1. vinyl-buffer
Convert streaming vinyl files to use buffers
vinyl-buffer
Package: vinyl-buffer
Created by: hughsk
Last modified: Tue, 28 Jun 2022 17:29:52 GMT
Version: 1.0.1
License: MIT
Downloads: 562,087
Repository: https://github.com/hughsk/vinyl-buffer

Install

npm install vinyl-buffer
yarn add vinyl-buffer

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.

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin