mirror of
https://github.com/rschamp/gh-pages.git
synced 2026-04-05 14:05:56 +08:00
Readme update
This commit is contained in:
30
readme.md
30
readme.md
@@ -281,38 +281,26 @@ ghpages.publish(path.join(__dirname, 'build'), {
|
|||||||
}, callback);
|
}, callback);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Dependencies
|
## Command Line Utility
|
||||||
|
|
||||||
Note that this plugin requires Git 1.7.6 or higher (because it uses the `--exit-code` option for `git ls-remote`). If you'd like to see this working with earlier versions of Git, please [open an issue](https://github.com/tschaub/gh-pages/issues).
|
Installing the package creates a `gh-pages` command line utility. Run `gh-pages --help` to see a list of supported options.
|
||||||
|
|
||||||
[](https://travis-ci.org/tschaub/gh-pages)
|
With a local install of `gh-pages`, you can set up a package script with something like the following:
|
||||||
|
|
||||||
## Cli
|
|
||||||
|
|
||||||
`gh-pages` can be used in Command line.
|
|
||||||
|
|
||||||
### scripts task
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"deploy": "npm run gh-pages",
|
"deploy": "gh-pages -d dist"
|
||||||
"gh-pages": "gh-pages -d dist -b gh-pages"
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
And then to publish everything from your `dist` folder to your `gh-pages` branch, you'd run this:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run deploy
|
npm run deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
### Global
|
## Dependencies
|
||||||
|
|
||||||
```shell
|
Note that this plugin requires Git 1.7.6 or higher (because it uses the `--exit-code` option for `git ls-remote`). If you'd like to see this working with earlier versions of Git, please [open an issue](https://github.com/tschaub/gh-pages/issues).
|
||||||
npm install gh-pages -g
|
|
||||||
gh-pages -d dist -b gh-pages
|
|
||||||
```
|
|
||||||
|
|
||||||
Cli support options below:
|
[](https://travis-ci.org/tschaub/gh-pages)
|
||||||
|
|
||||||
* `-d --dir` basePath
|
|
||||||
* `-s --src` options.src
|
|
||||||
* `-b --branch` options.branch
|
|
||||||
|
|||||||
Reference in New Issue
Block a user