Skip to content

armordog/vinyl-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#vinyl-string Build Status

For the terminally lazy

###constructor(fileContents, options)

fileContents

The contents of the pretend file

Type: String or Buffer

options

An options object for the creation of a vinyl file.

options.keepOpen

Set to true to keep the stream open. Use when piping /into/ the vinyl-string object.

###example

var vs = require('vinyl-string');
var vFile = vs(
  "my file contents!",
  {
    path: "filename.txt"
  }
);

vFile.pipe(gulp.dest("./output"));
/* if vFile is also a stream destination, set keepOpen: true */
var vs = require('vinyl-string');
var vFile = vs(
  "my file contents!",
  {
    path: "filename.txt",
    keepOpen: true // allow piping in to vFile
  }
);

gulp.src(["./src/*.txt"])
  .pipe(vFile)
  .pipe(gulp.dest("./output");

About

Create pretend vinyl streams from a string

Resources

License

Stars

Watchers

Forks

Packages

No packages published