How to use the fs-mkdirp-stream.obj function in fs-mkdirp-stream

To help you get started, we’ve selected a few fs-mkdirp-stream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gulpjs / vinyl-fs / lib / dest / index.js View on Github external
' Please specify a non-empty string or a function.');
  }

  var optResolver = createResolver(config, opt);
  var folderResolver = createResolver(folderConfig, { outFolder: outFolder });

  function dirpath(file, callback) {
    var dirMode = optResolver.resolve('dirMode', file);

    callback(null, file.dirname, dirMode);
  }

  var saveStream = pumpify.obj(
    prepare(folderResolver, optResolver),
    sourcemap(optResolver),
    mkdirpStream.obj(dirpath),
    writeContents(optResolver)
  );

  // Sink the output stream to start flowing
  return lead(saveStream);
}
github gulpjs / vinyl-fs / lib / symlink / index.js View on Github external
throw new Error('Invalid symlink() folder argument.' +
      ' Please specify a non-empty string or a function.');
  }

  var optResolver = createResolver(config, opt);
  var folderResolver = createResolver(folderConfig, { outFolder: outFolder });

  function dirpath(file, callback) {
    var dirMode = optResolver.resolve('dirMode', file);

    callback(null, file.dirname, dirMode);
  }

  var stream = pumpify.obj(
    prepare(folderResolver, optResolver),
    mkdirpStream.obj(dirpath),
    linkFile(optResolver)
  );

  // Sink the stream to start flowing
  return lead(stream);
}

fs-mkdirp-stream

Ensure directories exist before writing to them.

MIT
Latest version published 2 years ago

Package Health Score

66 / 100
Full package analysis

Popular fs-mkdirp-stream functions