Create vinyl files from a glob pattern
npm install vinyl-read> Create vinyl files from glob patterns
```
$ npm install --save vinyl-read
`js
const vinylRead = require('vinyl-read');
vinylRead('*.js').then(files => {
console.log(files.length);
//=> '2'
console.log(files[0].path);
//=> '/Users/samverschueren/dev/vinyl-read/index.js'
});
const files = vinylRead.sync(['*.js', '!index.js']);
console.log(files.length);
//=> '1'
console.log(file[0].path);
//=> '/Users/samverschueren/dev/vinyl-read/test.js'
`
Returns a promise for an array of vinyl files.
Create an array of vinyl files synchronously and return them.
#### patterns
Type: string, array
See supported minimatch patterns.
#### options
##### base
Type: string process.cwd()
Default:
Override the base of the vinyl file.
##### cwd
Type: string process.cwd()
Default:
Override the cwd (current working directory) of the vinyl file.
##### buffer
Type: boolean true
Default:
Setting this to false will return file.contents as a stream. This is useful when working with large files. Note: Plugins might not implement support for streams.
##### read
Type: boolean true
Default:
Setting this to false will return file.contents` as null and not read the file at all.
- vinyl-file - Create a vinyl file from an actual file
MIT © Sam Verschueren