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.
- Host: GitHub
- URL: https://github.com/doowb/gulp-gh-clone
- Owner: doowb
- License: mit
- Created: 2016-06-17T22:50:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-17T22:54:38.000Z (almost 9 years ago)
- Last Synced: 2025-02-26T19:52:02.353Z (about 2 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-gh-clone [](https://www.npmjs.com/package/gulp-gh-clone) [](https://npmjs.org/package/gulp-gh-clone) [](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._