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/dest/index.js | |
| parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) | |
remove node_modules
Diffstat (limited to 'node_modules/vinyl-fs/lib/dest/index.js')
| -rw-r--r-- | node_modules/vinyl-fs/lib/dest/index.js | 54 | 
1 files changed, 0 insertions, 54 deletions
diff --git a/node_modules/vinyl-fs/lib/dest/index.js b/node_modules/vinyl-fs/lib/dest/index.js deleted file mode 100644 index 049ac9690..000000000 --- a/node_modules/vinyl-fs/lib/dest/index.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -var through2 = require('through2'); -var sourcemaps = require('gulp-sourcemaps'); -var duplexify = require('duplexify'); -var sink = require('../sink'); -var prepareWrite = require('../prepareWrite'); -var writeContents = require('./writeContents'); - -function dest(outFolder, opt) { -  if (!opt) { -    opt = {}; -  } - -  function saveFile(file, enc, cb) { -    prepareWrite(outFolder, file, opt, function(err, writePath) { -      if (err) { -        return cb(err); -      } -      writeContents(writePath, file, cb); -    }); -  } - -  var saveStream = through2.obj(opt, saveFile); -  if (!opt.sourcemaps) { -    // Sink the save stream to start flowing -    // Do this on nextTick, it will flow at slowest speed of piped streams -    process.nextTick(sink(saveStream)); - -    return saveStream; -  } - -  var sourcemapOpt = opt.sourcemaps; -  if (typeof sourcemapOpt === 'boolean') { -    sourcemapOpt = {}; -  } -  if (typeof sourcemapOpt === 'string') { -    sourcemapOpt = { -      path: sourcemapOpt, -    }; -  } - -  var mapStream = sourcemaps.write(sourcemapOpt.path, sourcemapOpt); -  var outputStream = duplexify.obj(mapStream, saveStream); -  mapStream.pipe(saveStream); - -  // Sink the output stream to start flowing -  // Do this on nextTick, it will flow at slowest speed of piped streams -  process.nextTick(sink(outputStream)); - -  return outputStream; -} - -module.exports = dest;  | 
