You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+93-50
Original file line number
Diff line number
Diff line change
@@ -7,34 +7,29 @@
7
7
8
8
<hr>
9
9
10
-
This __was__ an angular CLI addon (until they [removed addon support](https://github.com/angular/angular-cli/pull/3695)).
11
-
Now it's just a wrapper around [tschaub/gh-pages](https://github.com/tschaub/gh-pages).
12
-
13
10
Publish to any gh-pages branch on GitHub (or any other branch on any other remote).
14
-
Made for Travis-CI. Brought to you by the [angular-buch.com](https://angular-buch.com/) team!
11
+
Made for angular-cli users.
12
+
Made with Travis-CI in mind.
13
+
Brought to you by the [angular-buch.com](https://angular-buch.com/) team!
15
14
16
15
## About
17
16
18
-
This script is similar to the normal `github-pages:deploy` command.
19
-
But by design, the command is limited to the `gh-pages` branch of the same repository.
20
-
__New: The deploy command is being removed from the core of the CLI very soon! [#4385](https://github.com/angular/angular-cli/pull/4385)__
21
-
22
-
23
-
In contrast to this, the [angular-buch/angular-cli-ghpages](https://github.com/angular-buch/angular-cli-ghpages) script is able to push to any branch on any repository. It's made on top of [tschaub/gh-pages](https://github.com/tschaub/gh-pages).
24
-
__This script works great on [Travis-CI](https://travis-ci.org/).__ No git credentials must be set up in before. Specific environment variables of Travis-CI are evaluated, too. You will like it!
17
+
This command is similar to the old `github-pages:deploy` command of @angular/cli which was removed in [#4385](https://github.com/angular/angular-cli/pull/4385).
18
+
The [angular-cli-ghpages](https://github.com/angular-buch/angular-cli-ghpages) command is able to push to any branch on any repository. It's made on top of [tschaub/gh-pages](https://github.com/tschaub/gh-pages).
19
+
**This script works great on [Travis-CI](https://travis-ci.org/).** No git credentials must be set up in before. Specific environment variables of Travis-CI are evaluated, too. You will like it!
25
20
26
21
27
22
## Installation & Setup
28
23
29
-
This addon has the following prerequisites:
24
+
This command has the following prerequisites:
30
25
31
26
- Node.js 4.x
32
27
- Git 1.7.6 or higher
33
-
-Optional: Angular project created via [angular-cli](https://github.com/angular/angular-cli)
28
+
-__optional__: Angular project created via [angular-cli](https://github.com/angular/angular-cli)
34
29
35
-
To install this addon run the following command:
30
+
To install the command run the following:
36
31
37
-
```sh
32
+
```bash
38
33
npm i -g angular-cli-ghpages
39
34
```
40
35
@@ -45,14 +40,14 @@ __Note: you have to create the `dist` folder in before (e.g. `ng build --prod`)
45
40
46
41
Usage:
47
42
48
-
```sh
43
+
```bash
49
44
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
50
45
angular-cli-ghpages [OPTIONS]
51
46
```
52
47
53
48
there is also a shorter `ngh` command available
54
49
55
-
```sh
50
+
```bash
56
51
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
57
52
ngh [OPTIONS]
58
53
```
@@ -61,73 +56,106 @@ If you want to push to `gh-pages` on the same repository with your default crede
61
56
62
57
## Options
63
58
59
+
60
+
#### <aid="help">--help</a>
61
+
* Example: `ngh --help`
62
+
63
+
Output usage information.
64
+
65
+
66
+
#### <aid="version">--version</a>
67
+
* Example: `ngh --version`
68
+
69
+
Output the version number. Please provide the version number on any bug report!
70
+
71
+
64
72
#### <aid="repo">--repo</a>
65
-
* optional
66
-
* default: url of the origin remote of the current dir (assumes a git repository)
73
+
*__optional__
74
+
* Default: url of the origin remote of the current dir (assumes a git repository)
By default, __gh-pages__ assumes that the current working directory is a git repository,
78
+
and that you want to push changes to the `origin` remote.
79
+
If instead your files are not in a git repository, or if you want to push to another repository,
80
+
you can provide the repository URL in the `repo` option.
67
81
68
-
By default, __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.
69
82
70
83
#### <aid="message">--message</a>
71
-
* optional
72
-
* default: `Auto-generated commit`
84
+
*__optional__
85
+
* Default: `Auto-generated commit`
86
+
* Example: `ngh --message="What could possibly go wrong?"`
73
87
74
88
The commit message, __must be wrapped in quotes__.
75
-
Some handy additional text is always added, if the environment variable `process.env.TRAVIS` exists (for Travis CI).
76
-
77
-
Example:
78
-
```sh
79
-
angular-cli-ghpages --message="What could possibly go wrong?"
80
-
```
89
+
Some handy additional text is always added,
90
+
if the environment variable `process.env.TRAVIS` exists (for Travis CI).
81
91
82
92
83
93
#### <aid="branch">--branch</a>
84
-
* optional
85
-
* default: `gh-pages`
94
+
*__optional__
95
+
* Default: `gh-pages`
96
+
* Example: `ngh --branch=other-branch`
86
97
87
-
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.
98
+
The name of the branch you'll be pushing to.
99
+
The default uses GitHub's `gh-pages` branch,
100
+
but this can be configured to push to any branch on any remote.
88
101
89
102
90
103
#### <aid="name">--name & --email</a>
91
-
* optional
92
-
* default: value of `git config user.name` and `git config user.email`
104
+
*__optional__
105
+
* Default: value of `git config user.name` and `git config user.email`
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.
108
+
If you are running the command in a repository without a `user.name` or `user.email` git config properties
109
+
(or on a machine without these global config properties),
110
+
you must provide user info before git allows you to commit.
111
+
In this case provide both `name` and `email` string values to identify the committer.
Suppress logging. With silent `true` log messages are suppressed and error messages are sanitized.
121
+
Logging is in silent mode by default.
122
+
In silent mode log messages are suppressed and error messages are sanitized.
102
123
103
-
> This option should be used if the repository URL or other information passed to git commands is sensitive and should not be logged (== you have a public build server). By default the silent mode is enabled to avoid sensitive data exposure.
124
+
The `--no-silent` option enables extended console logging.
125
+
Keep this untouched if the repository URL or other information passed to git commands is sensitive!
126
+
127
+
> WARNING: This option should kept like it is if the repository URL or other information passed to git commands is sensitive and should not be logged (== you have a public build server). By default the silent mode is enabled to avoid sensitive data exposure.
104
128
105
129
106
130
#### <aid="dir">--dir</a>
107
-
*optional
108
-
*default: `dist`
131
+
*__optional__
132
+
*Default: `dist`
109
133
110
134
Directory for all published sources, relative to the project-root.
111
135
Most probably no change is required here.
112
-
This option can be used to deploy completely different folders, which are not related at all to angular.
113
-
136
+
This option can be used to deploy completely different folders,
137
+
which are not related at all to angular.
114
138
115
139
116
-
#### <aid="dotfiles">--dotfiles</a>
117
-
* optional
118
-
* default: `true` (boolean)
119
140
120
-
Includes dotfiles by default. When set to `false` files starting with `.` are ignored.
141
+
#### <aid="no-dotfiles">--no-dotfiles</a>
142
+
*__optional__
143
+
* Default: dotfiles `true` (boolean)
144
+
* Example:
145
+
*`ngh` -- Dotfiles are included by default.
146
+
*`ngh --no-dotfiles` -- Dotfiles are ignored.
121
147
148
+
The command includes dotfiles by default (e.g `.htaccess` will be committed)
149
+
With `--no-dotfiles` files starting with `.` are ignored.
122
150
123
151
124
152
## Extra
125
153
126
-
For your convenience, the addon will recognize the [environment variable](https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings)`GH_TOKEN` and will replace this pattern in the `--repo` string. Please __do NOT disable the silent mode__ if you have any credentials in the repository URL! Read more about [Github tokens here](https://help.github.com/articles/creating-an-access-token-for-command-line-use/).
154
+
For your convenience, the command will recognize the [environment variable](https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings)`GH_TOKEN` and will replace this pattern in the `--repo` string. Please __do NOT disable the silent mode__ if you have any credentials in the repository URL! Read more about [Github tokens here](https://help.github.com/articles/creating-an-access-token-for-command-line-use/).
127
155
128
156
In example, the following command runs [on our Travis-CI](https://travis-ci.org/angular-buch/book-monkey2):
Copy file name to clipboardExpand all lines: bin/angular-cli-ghpages
+2-2
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ program
13
13
.option('-b, --branch <branch>','The git branch to push your pages to.','gh-pages')
14
14
.option('-n, --name <name>','The git user-name which is associated with this commit.')
15
15
.option('-e, --email <email>','The git user-email which is associated with this commit')
16
-
.option('-x, --silent','Suppress console logging. This option should be used if the repository URL or other information passed to git commands is sensitive! Default: true')
17
-
.option('-t, --dotfiles','Includes dotfiles by default. When set to `false` files starting with `.` are ignored. Default: true')
16
+
.option('-S, --no-silent','Logging is in silent mode by default. The option enables extended console logging. Keep this untouched if the repository URL or other information passed to git commands is sensitive!')
17
+
.option('-T, --no-dotfiles','Includes dotfiles by default. When set files starting with `.` are ignored.')
Copy file name to clipboardExpand all lines: package.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "angular-cli-ghpages",
3
-
"version": "0.4.1",
3
+
"version": "0.5.0",
4
4
"description": "Wrapper around gh-pages, made for angular-cli users. Publish to any gh-pages branch on GitHub (or any other branch on any other remote).",
0 commit comments