Package Exports
- to-file
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (to-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
to-file

Convert a file path to a vinyl file.
Install
Install with npm:
$ npm i to-file --saveUsage
var toFile = require('to-file');
var glob = require('glob');
var files = glob.sync('**/*.js')
files = files.map(function(fp) {
return toFile(fp);
});glob parent
Optionally pass the original glob pattern as the second argument to populate file.base from the [glob-parent][].
var files = glob.sync('**/*.js')
files = files.map(function(fp) {
return toFile(fp, '**/*.js');
});options
If an options object is passed as the second or third argument, the cwd and base properties will be used to update the file object, and the options object will be added as a property on the file object.
var files = glob.sync('**/*.js')
files = files.map(function(fp) {
return toFile(fp, '**/*.js');
});Related projects
- to-template: Convert a vinyl file object to a Template-compatible template object. | homepage
- to-vinyl: Convert an object to a vinyl file object. Safely mixes additional properties onto the file… more | homepage
Running tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb, v0.9.0, on February 12, 2016.