mirror of
				https://github.com/rschamp/gh-pages.git
				synced 2025-11-04 04:41:11 +08:00 
			
		
		
		
	Document the remote option
This commit is contained in:
		
							parent
							
								
									dfbdfe08f3
								
							
						
					
					
						commit
						ce5368f8a1
					
				@ -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');
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										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>
 | 
			
		||||
 * type: `string`
 | 
			
		||||
 * default: `''`
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user