1. vinyl-named
Give vinyl files chunk names.
vinyl-named
Package: vinyl-named
Created by: shama
Last modified: Tue, 28 Jun 2022 17:31:34 GMT
Version: 1.1.0
Downloads: 82,560
Repository: https://github.com/shama/vinyl-named

Install

npm install vinyl-named
yarn add vinyl-named

vinyl-named

Give vinyl files arbitrary chunk names.

example

 var named = require('vinyl-named')
var fs = require('vinyl-fs')
var through = require('through')

fs.src('src/*.js')
  .pipe(named())
  .pipe(through(function(file) {
    // file.named now equals the basename minus the extension
  }))

// Or return a name for a given file
fs.src('src/*.js')
  .pipe(named(function(file) {
    return 'your own name'
  }))

// Or specify a custom name property
fs.src('src/*.js')
  .pipe(named(function(file) {
    file.customName = 'your name'
    this.queue(file)
  }))

install

With npm do:

 npm install vinyl-named

release history

  • 1.1.0 - renaming chunkName to named to be more generic
  • 1.0.0 - initial release

license

Copyright (c) 2014 Kyle Robinson Young
Licensed under the MIT license.

Dependencies

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