Skip to content
💽 Give vinyl files arbitrary names.
JavaScript
Branch: master
Clone or download
Latest commit 650ee92 Oct 16, 2014
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test Rename chunkName to named Oct 16, 2014
.editorconfig init Oct 15, 2014
.gitignore init Oct 15, 2014
LICENSE-MIT init Oct 15, 2014
README.md Rename chunkName to named Oct 16, 2014
index.js Rename chunkName to named Oct 16, 2014
package.json v1.1.0 Oct 16, 2014

README.md

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.

You can’t perform that action at this time.