An open API service indexing awesome lists of open source software.

https://github.com/doowb/gulp-gh-clone

Clone github repositories into a specified folder.
https://github.com/doowb/gulp-gh-clone

Last synced: about 1 month ago
JSON representation

Clone github repositories into a specified folder.

Awesome Lists containing this project

README

        

# gulp-gh-clone [![NPM version](https://img.shields.io/npm/v/gulp-gh-clone.svg?style=flat)](https://www.npmjs.com/package/gulp-gh-clone) [![NPM downloads](https://img.shields.io/npm/dm/gulp-gh-clone.svg?style=flat)](https://npmjs.org/package/gulp-gh-clone) [![Build Status](https://img.shields.io/travis/doowb/gulp-gh-clone.svg?style=flat)](https://travis-ci.org/doowb/gulp-gh-clone)

Clone github repositories into a specified folder.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install gulp-gh-clone --save
```

## Usage

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

## API

### [clone](index.js#L37)

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**

```js
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](https://github.com/doowb/gulp-gh-clone/issues/new).

## Building docs

Generate readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install verb && npm run docs
```

Or, if [verb](https://github.com/verbose/verb) is installed globally:

```sh
$ verb
```

## Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

## Author

**Brian Woodward**

* [github/doowb](https://github.com/doowb)
* [twitter/doowb](http://twitter.com/doowb)

## License

Copyright © 2016, [Brian Woodward](https://github.com/doowb).
Released under the [MIT license](https://github.com/doowb/gulp-gh-clone/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on June 17, 2016._