diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/vinyl-fs/lib/src/index.js | |
parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) |
remove node_modules
Diffstat (limited to 'node_modules/vinyl-fs/lib/src/index.js')
-rw-r--r-- | node_modules/vinyl-fs/lib/src/index.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/node_modules/vinyl-fs/lib/src/index.js b/node_modules/vinyl-fs/lib/src/index.js deleted file mode 100644 index 06cbe754d..000000000 --- a/node_modules/vinyl-fs/lib/src/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -var assign = require('object-assign'); -var through2 = require('through2'); -var gs = require('glob-stream'); -var duplexify = require('duplexify'); -var merge = require('merge-stream'); -var sourcemaps = require('gulp-sourcemaps'); -var filterSince = require('../filterSince'); -var isValidGlob = require('is-valid-glob'); - -var getContents = require('./getContents'); -var wrapWithVinylFile = require('./wrapWithVinylFile'); - -function src(glob, opt) { - var options = assign({ - read: true, - buffer: true, - stripBOM: true, - sourcemaps: false, - passthrough: false, - followSymlinks: true, - }, opt); - - // Don't pass `read` option on to through2 - var read = options.read !== false; - options.read = undefined; - - var inputPass; - - if (!isValidGlob(glob)) { - throw new Error('Invalid glob argument: ' + glob); - } - - var globStream = gs.create(glob, options); - - var outputStream = globStream - .pipe(wrapWithVinylFile(options)); - - if (options.since != null) { - outputStream = outputStream - .pipe(filterSince(options.since)); - } - - if (read) { - outputStream = outputStream - .pipe(getContents(options)); - } - - if (options.passthrough === true) { - inputPass = through2.obj(options); - outputStream = duplexify.obj(inputPass, merge(outputStream, inputPass)); - } - if (options.sourcemaps === true) { - outputStream = outputStream - .pipe(sourcemaps.init({ loadMaps: true })); - } - globStream.on('error', outputStream.emit.bind(outputStream, 'error')); - return outputStream; -} - -module.exports = src; |