Document the remote option

This commit is contained in:
Tim Schaub 2016-03-02 08:40:48 -07:00
parent dfbdfe08f3
commit ce5368f8a1
2 changed files with 21 additions and 0 deletions

View file

@ -15,6 +15,8 @@ program
.option('-x, --silent', 'Do not output the repository url')
.option('-b, --branch <branch>',
'name of the branch you\'ll be pushing to', 'gh-pages')
.option('-o, --remote <name>',
'The name of the remote', 'origin')
.option('-m, --message <message>',
'commit message', 'Updates')
.option('-t, --dotfiles', 'Include dotfiles')
@ -30,6 +32,7 @@ ghpages.publish(path.join(process.cwd(), program.dist), {
message: program.message,
dotfiles: !!program.dotfiles,
add: !!program.add,
remote: program.remote,
push: !program.noPush,
logger: function(message) {
process.stderr.write(message + '\n');

View file

@ -149,6 +149,24 @@ ghpages.publish(path.join(__dirname, 'build'), {
```
#### <a id="optionsremote">options.remote</a>
* type: `string`
* default: `'origin'`
The name of the remote you'll be pushing to. The default is your `'origin'` remote, but this can be configured to push to any remote.
Example use of the `remote` option:
```js
/**
* This task pushes to the `gh-pages` branch of of your `upstream` remote.
*/
ghpages.publish(path.join(__dirname, 'build'), {
remote: 'upstream'
}, callback);
```
#### <a id="optionstag">options.tag</a>
* type: `string`
* default: `''`