Skip to content

Commit

Permalink
feat: Add noRestore option to docfx metadata command (#10428)
Browse files Browse the repository at this point in the history
feat: add `noRestore` option to `docfx metadata` command
  • Loading branch information
filzrev authored Nov 27, 2024
1 parent 1c07554 commit 1a6038c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/reference/docfx-cli-reference/docfx-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ Run `docfx metadata --help` or `docfx -h` to get a list of all available options

Disable the default API filter (default filter only generate public or protected APIs).

- **--noRestore**

Do not run `dotnet restore` before building the projects.

- **--namespaceLayout**

Determines the namespace layout in table of contents.
Expand Down
1 change: 1 addition & 0 deletions src/docfx/Models/MetadataCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ private static void MergeOptionsToConfig(MetadataCommandOptions options, DocfxCo
item.ShouldSkipMarkup |= options.ShouldSkipMarkup;
item.DisableGitFeatures |= options.DisableGitFeatures;
item.DisableDefaultFilter |= options.DisableDefaultFilter;
item.NoRestore |= options.NoRestore;
item.CategoryLayout = options.CategoryLayout ?? item.CategoryLayout;
item.NamespaceLayout = options.NamespaceLayout ?? item.NamespaceLayout;
item.MemberLayout = options.MemberLayout ?? item.MemberLayout;
Expand Down
4 changes: 4 additions & 0 deletions src/docfx/Models/MetadataCommandOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ internal class MetadataCommandOptions : LogOptions
[CommandOption("--disableDefaultFilter")]
public bool DisableDefaultFilter { get; set; }

[Description("Do not run `dotnet restore` before building the projects")]
[CommandOption("--noRestore")]
public bool NoRestore { get; set; }

[Description("Determines the category layout in table of contents.")]
[CommandOption("--categoryLayout")]
public CategoryLayout? CategoryLayout { get; set; }
Expand Down

0 comments on commit 1a6038c

Please sign in to comment.