mirror of
https://github.com/rschamp/gh-pages.git
synced 2026-02-09 10:33:42 +08:00
Document the remote option
This commit is contained in:
@@ -15,6 +15,8 @@ program
|
|||||||
.option('-x, --silent', 'Do not output the repository url')
|
.option('-x, --silent', 'Do not output the repository url')
|
||||||
.option('-b, --branch <branch>',
|
.option('-b, --branch <branch>',
|
||||||
'name of the branch you\'ll be pushing to', 'gh-pages')
|
'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>',
|
.option('-m, --message <message>',
|
||||||
'commit message', 'Updates')
|
'commit message', 'Updates')
|
||||||
.option('-t, --dotfiles', 'Include dotfiles')
|
.option('-t, --dotfiles', 'Include dotfiles')
|
||||||
@@ -30,6 +32,7 @@ ghpages.publish(path.join(process.cwd(), program.dist), {
|
|||||||
message: program.message,
|
message: program.message,
|
||||||
dotfiles: !!program.dotfiles,
|
dotfiles: !!program.dotfiles,
|
||||||
add: !!program.add,
|
add: !!program.add,
|
||||||
|
remote: program.remote,
|
||||||
push: !program.noPush,
|
push: !program.noPush,
|
||||||
logger: function(message) {
|
logger: function(message) {
|
||||||
process.stderr.write(message + '\n');
|
process.stderr.write(message + '\n');
|
||||||
|
|||||||
18
readme.md
18
readme.md
@@ -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>
|
#### <a id="optionstag">options.tag</a>
|
||||||
* type: `string`
|
* type: `string`
|
||||||
* default: `''`
|
* default: `''`
|
||||||
|
|||||||
Reference in New Issue
Block a user