Skip to content

Commit 14bf419

Browse files
committed
readme with the planned features
1 parent 8cf51e0 commit 14bf419

File tree

2 files changed

+55
-12
lines changed

2 files changed

+55
-12
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.DS_Store
3+
.vscode

README.md

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,77 @@
11
# angular-cli-ghpages
22

33
Angular CLI addon. Publish to any gh-pages branch on GitHub (or any other branch on any other remote).
4-
This is __NOT__ [angular-cli-github-pages](https://github.com/IgorMinar/angular-cli-github-pages).
4+
This is __NOT__ [IgorMinar/angular-cli-github-pages](https://github.com/IgorMinar/angular-cli-github-pages) - but inspired by it.
55

66
## WHY?
77

8-
angular-cli-github-pages is fixed to the `gh-pages` branch of the same repository.
9-
We don't like this. So this addon pushes to any branch on any repository. It also does not require SSH to be set up. This works perfectly for Travis-CI.
8+
[IgorMinar/angular-cli-github-pages](https://github.com/IgorMinar/angular-cli-github-pages) is fixed to the `gh-pages` branch of the same repository. In my oponion it is also trying to do too much.
9+
In contrast to this, the [Angular2Buch/angular-cli-ghpages](https://github.com/Angular2Buch/angular-cli-ghpages) addon is much more simple. It pushes to any branch on any repository, by utilizing [tschaub/gh-pages](https://github.com/tschaub/gh-pages). Nothing more.
10+
This addon works perfectly on Travis-CI.
1011

1112
## Installation & Setup
1213

1314
This addon has the following prerequisites:
1415

15-
- Node.js 4.x
16-
- Angular project created via [angular-cli](https://github.com/angular/angular-cli)
16+
- Node.js 4.x
17+
- Git 1.7.6 or higher
18+
- Angular project created via [angular-cli](https://github.com/angular/angular-cli)
1719

18-
To install this addon all you need to do is install angular-cli-github-pages via npm:
20+
To install this addon all you need to do is install `angular-cli-github-pages` via npm:
1921

2022
```sh
21-
npm install --save-dev angular-cli-ghpages
23+
npm i angular-cli-ghpages --saveDev
2224
```
2325

2426
## Usage
2527

26-
Once that's done, you can checkout the branch you want to create the gh-page
27-
from (likely master) and run the command to build and commit it.
28+
Run `ng build` to fill the `dist` folder.
29+
Then execute `ng ghpages` in order to deploy it.
2830

29-
Then run `ng ghpages` in order to deploy it.
31+
Usage:
3032

3133
```sh
32-
ng build
33-
ng ghpages XXX
34+
ng build --environment=production
35+
ng ghpages [OPTIONS]
3436
```
3537

38+
## Options
39+
40+
#### <a id="repo">--repo</a>
41+
* optional
42+
* default: url of the origin remote of the current dir (assumes a git repository)
43+
44+
By default, [tschaub/gh-pages](https://github.com/tschaub/gh-pages) assumes that the current working directory is a git repository, and that you want to push changes to the `origin` remote. If instead your script is not in a git repository, or if you want to push to another repository, you can provide the repository URL in the `repo` option.
45+
46+
#### <a id="message">--message</a>
47+
* optional
48+
* default: `Auto-generated commit`
49+
50+
The commit message, __must be wrapped in quotes__.
51+
Hardcoded additional text is always added, if the environment variable `process.env.TRAVIS` exists (for Travis CI).
52+
53+
Example:
54+
```sh
55+
ng ghpages --message "What could possibly go wrong?"
56+
```
57+
58+
59+
#### <a id="branch">--branch</a>
60+
* optional
61+
* default: `gh-pages`
62+
63+
The name of the branch you'll be pushing to. The default uses GitHub's `gh-pages` branch, but this can be configured to push to any branch on any remote.
64+
65+
66+
#### <a id="name">--name & --email</a>
67+
* optional
68+
* default: value of `git config user.name` and `git config user.email`
69+
70+
If you are running the command in a repository without a `user.name` or `user.email` git config properties (or on a machine without these global config properties), you must provide user info before git allows you to commit. In this case provide both `name` and `email` string values to identify the committer.
71+
72+
73+
74+
75+
3676
## License
3777
Code released under the [MIT license](https://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)