Skip to content

Commit d6f1592

Browse files
committed
chore: remove obsolete TODO and clean up PublishOptions type
- Remove TODO about Commander issue #928 (irrelevant after fork) - Remove internal options from PublishOptions interface: - notfound (angular-cli-ghpages handles 404.html) - noDotfiles, noNotfound, noNojekyll (transformed before gh-pages) - dryRun (angular-cli-ghpages internal) - Add documentation clarifying which options gh-pages accepts
1 parent ef77802 commit d6f1592

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/angular-cli-ghpages

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ var path = require('path'),
88
pjson = require('./package.json'),
99
commander = require('./commander-fork');
1010

11-
// defaults-file was ignored for --no-dotfiles, so it is not used here
12-
// TODO: review https://github.com/tj/commander.js/issues/928 and check again if it now works
13-
// (this is not a big problem, because true is currently the desired value and this is also the value in the defaults file)
11+
// Boolean defaults for --no-X options are handled via defaults.ts
12+
// Commander v3 auto-sets dotfiles/notfound/nojekyll to true, which matches our defaults
1413
commander
1514
.version(pjson.version)
1615
.description(pjson.description)

src/interfaces.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export interface DeployUser {
2828
/**
2929
* Options for gh-pages.publish()
3030
* Based on https://github.com/tschaub/gh-pages#options
31+
*
32+
* Note: Only includes options that gh-pages actually accepts.
33+
* Internal options (notfound, noDotfiles, noNotfound, noNojekyll, dryRun)
34+
* are handled by angular-cli-ghpages before calling gh-pages.
3135
*/
3236
export interface PublishOptions {
3337
repo?: string;
@@ -36,15 +40,10 @@ export interface PublishOptions {
3640
message?: string;
3741
user?: { name: string; email: string };
3842
dotfiles?: boolean;
39-
notfound?: boolean;
4043
nojekyll?: boolean;
41-
noDotfiles?: boolean;
42-
noNotfound?: boolean;
43-
noNojekyll?: boolean;
4444
cname?: string;
4545
add?: boolean;
4646
git?: string;
47-
dryRun?: boolean;
4847
[key: string]: unknown; // Allow additional gh-pages options
4948
}
5049

0 commit comments

Comments
 (0)