vinyl-named
Give vinyl files chunk names.
Last updated 6 years ago by shama .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vinyl-named 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.1.0                                ...           latest (6 years ago)

2 Versions

  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 1
This Week 10
This Month 137
Last Day 9
Last Week 81
Last Month 363
Dependencies (1)
Dev Dependencies (2)
Dependents (129)

Copyright 2014 - 2016 © taobao.org |