gulp-gh-clone

0.1.0 • Public • Published

gulp-gh-clone NPM version NPM downloads Build Status

Clone github repositories into a specified folder.

Install

Install with npm:

$ npm install gulp-gh-clone --save

Usage

var clone = require('gulp-gh-clone');

API

clone

Returns a vinyl stream that will all the given function for each file coming through. The function should return an array of github repositories to be cloned.

Params

  • options {Object}: Options
  • options.fn {Function}: Function that takes a file object and returns an array of github repositories.
  • options.dest {String|Function}: Destination path to clone the repos to. If a function, then it will be called with the repo name and expect a string to be returned.
  • returns {Stream}: Stream to be used in a gulp pipeline.

Example

var options = {
  dest: 'dist',
  fn: function(file) {
    var data = JSON.parse(file.contents.toString());
    return Object.keys(data.dependencies);
  }
};
 
gulp.task('clone', function() {
  return gulp.src('package.json')
    .pipe(clone(options));
});

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

$ npm install verb && npm run docs

Or, if verb is installed globally:

$ verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Brian Woodward

License

Copyright © 2016, Brian Woodward. Released under the MIT license.


This file was generated by verb, v0.9.0, on June 17, 2016.

Readme

Keywords

none

Package Sidebar

Install

npm i gulp-gh-clone

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jonschlinkert
  • doowb