stream-loader
v0.2.0
Published
create a read stream from a glob of files. can be used as a loader-cache loader, or by itself as an a-la-carte replacement or addition to vinyl src.
Downloads
4
Maintainers
Readme
stream-loader
create a read stream from a glob of files. can be used as a loader-cache loader, or by itself as an a-la-carte replacement or addition to vinyl src.
Install
Install with npm
$ npm i stream-loader --save
Usage
Files are loaded as vinyl files, so gulp plugins should be completely compatible.
var jshint = require('gulp-jshint');
var minify = require('gulp-minify');
var loader = require('stream-loader');
var dest = require('dest');
var src = loader();
src(['*.js'])
.pipe(jshint())
.pipe(minify())
.pipe(dest('dist/'));
Stack src
src
definitions can be stacked:
var src = loader();
src(['*.js'])
.pipe(src('*.txt'))
.pipe(src('*.json'))
.pipe(src('*.md'))
Related projects
- composer: API-first task runner with three methods: task, run and watch. | homepage
- file-contents: Set the
contents
property on a file object. Abstraction from vinyl-fs to support stream or… more | homepage - file-stat: Set the
stat
property on a file object. Abstraction from vinyl-fs to support stream or… more | homepage - file-symlinks: Resolve symlinks and expose the
stat
property on a file object. | homepage - generate: Project generator, for node.js. | homepage
- vinyl: A virtual file format | homepage
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on October 06, 2015.