Skip to content

Commit

Permalink
docs: Cleanup README by moving "Installation" and "Usage" to separate…
Browse files Browse the repository at this point in the history
… documents [Skip CI]
  • Loading branch information
ap0llo committed Dec 29, 2019
1 parent 965c709 commit 82fe64d
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 120 deletions.
125 changes: 5 additions & 120 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,128 +20,13 @@ It currently supports:

For an example of what the output looks like, have a look at the [demoprojects](docs/demoprojects) directory.

## Installation
## Installation & Usage

*MdDocs* is a distributed as NuGet packages.
For documentation on installation and usage, please refer to the
corresponding sub-pages:

- Prerelease builds are available on [MyGet](https://www.myget.org/feed/ap0llo-mddocs/package/nuget/Grynwald.Utilities)
- Release versions are available on [NuGet.org](https://www.nuget.org/packages/Grynwald.MdDocs)

MdDocs can be used either as .NET Core (global) tool or integrated into
the project build as a set of MSBuild targets.

### Installing the .NET Core Tool

The package `Grynwald.MdDocs` provides MdDocs as a .NET Core (global) tool.
To install it, run

```ps1
dotnet tool install --global Grynwald.MdDocs
```

### Installing MSBuild integration

The package `Grynwald.MdDocs.MSBuild` provides allows generating documentation
as part of the build process. To install the package, run

```ps1
dotnet add package Grynwald.MdDocs.MSBuild
```

## Usage

### .NET Core Tool

See also: [Command Line Reference](docs/commandline/index.md)

#### API Reference

To generate API reference documentation for a .NET assembly, run:

```ps1
mddocs apireference --assembly <PATH-TO-ASSEMBLY> --outdir <OUTPUT-DIRECTORY>
```

**Note:** If the output directory already exists, all files in the output
directory will be deleted.

For an example of what the output looks like, have a look at the
[demo project](docs/demoprojects/api/DemoProject/index.md).

For a list of supported documentation tags, see
[Supported documentation tags](./docs/apireference/tags.md).

#### Command Line Help

To generate command line help for .NET console application implemented using
the [CommandLineParser package](https://www.nuget.org/packages/CommandLineParser/),
run:

```ps1
mddocs commandlinehelp --assembly <PATH-TO-ASSEMBLY> --outdir <OUTPUT-DIRECTORY>
```

**Note:** If the output directory already exists, all files in the output
directory will be deleted.

For an example of what the output looks like, have a look at the
[demo project](docs/demoprojects/commandline/index.md).

### MSBuild-integrated

When the MSBuild package is installed, documentation can be generated
by running the appropriate MSBuild targets. Optionally, the targets
can eb configured to automatically generate documentation when the
project is built.

#### API Reference

To generate API reference for a project, run

```ps1
dotnet msbuild <PROJECT> /t:GenerateApiReferenceDocumentation
```

The behaviour of the target can be customized by setting the following
MSBuild properties:

| Property Name | Default Value | Description |
|--------------------------------------------|--------------------------|-------------------------------------------------------------------------------------------|
| `ApiReferenceDocumentationOutputPath` | `$(OutputPath)docs/api/` | The directory to save the generated documetation to. |
| `GenerateApiReferenceDocumentationOnBuild` | `false` | Set the to `true` to automatically generate API documentation when the project is built. |
| `MdDocsMarkdownPreset` | `Default` | Specify the "preset" to use for the generated markdown. Valid values: `Default`, `MkDocs` |

**Note:** If the output directory already exists, all files in the output
directory will be deleted.

For an example of what the output looks like, have a look at the
[demo project](docs/demoprojects/api/DemoProject/index.md).

For a list of supported documentation tags, see
[Supported documentation tags](./docs/apireference/tags.md).

#### Command Line Help

To generate command line documentation for a project, run

```ps1
dotnet msbuild <PROJECT> /t:GenerateCommandLineDocumentation
```

The behaviour of the target can be customized by setting the following
MSBuild properties:

| Property Name | Default Value | Description |
|-------------------------------------------|----------------------------------|-----------------------------------------------------------------------------------------------|
| `CommandLineDocumentationOutputPath` | `$(OutputPath)docs/commandline/` | The directory to save the generated documetation to. |
| `GenerateCommandLineDocumentationOnBuild` | `false` | Set to `true` to automatically generate command line documentation when the project is built. |
| `MdDocsMarkdownPreset` | `Default` | Specify the "preset" to use for the generated markdown. Valid values: `Default`, `MkDocs` |

**Note:** If the output directory already exists, all files in the output
directory will be deleted.

For an example of what the output looks like, have a look at the
[demo project](docs/demoprojects/commandline/index.md).
- [MdDocs .NET CLI Tool](./docs/net-cli-tool.md)
- [MdDocs MSBuild Integration](./docs/msbuild-integration.md)

## Building from source

Expand Down
79 changes: 79 additions & 0 deletions docs/msbuild-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# MdDocs MSBuild Integration

## Installation

*MdDocs* is a distributed as NuGet packages.

- Prerelease builds are available on [MyGet](https://www.myget.org/feed/ap0llo-mddocs/package/nuget/Grynwald.Utilities)
- Release versions are available on [NuGet.org](https://www.nuget.org/packages/Grynwald.MdDocs)

MdDocs can be used either as .NET Core (global) tool (see
[MdDocs .NET CLI tool](./net-cli-tool.md)) or integrated into
the project build as a set of MSBuild targets.

[![NuGet](https://img.shields.io/nuget/v/Grynwald.MdDocs.MSBuild.svg)](https://www.nuget.org/packages/Grynwald.MdDocs.MSBuild)

The package `Grynwald.MdDocs.MSBuild` allows generating documentation
as part of the build process. To install the package, run

```ps1
dotnet add package Grynwald.MdDocs.MSBuild
```

or install it through the Visual Studio NuGet package manager

## Usage

When the MSBuild package is installed, documentation can be generated
by running the appropriate MSBuild targets. Optionally, the targets
can be configured to automatically generate documentation when the
project is built.

### API Reference

To generate API reference for a project, run

```ps1
dotnet msbuild <PROJECT> /t:GenerateApiReferenceDocumentation
```

The behaviour of the target can be customized by setting the following
MSBuild properties:

| Property Name | Default Value | Description |
|--------------------------------------------|--------------------------|-------------------------------------------------------------------------------------------|
| `ApiReferenceDocumentationOutputPath` | `$(OutputPath)docs/api/` | The directory to save the generated documetation to. |
| `GenerateApiReferenceDocumentationOnBuild` | `false` | Set the to `true` to automatically generate API documentation when the project is built. |
| `MdDocsMarkdownPreset` | `Default` | Specify the "preset" to use for the generated markdown. Valid values: `Default`, `MkDocs` |

**Note:** If the output directory already exists, all files in the output
directory will be deleted.

For an example of what the output looks like, have a look at the
[demo project](./demoprojects/api/DemoProject/index.md).

For a list of supported documentation tags, see
[Supported documentation tags](./apireference/tags.md).

### Command Line Help

To generate command line documentation for a project, run

```ps1
dotnet msbuild <PROJECT> /t:GenerateCommandLineDocumentation
```

The behaviour of the target can be customized by setting the following
MSBuild properties:

| Property Name | Default Value | Description |
|-------------------------------------------|----------------------------------|-----------------------------------------------------------------------------------------------|
| `CommandLineDocumentationOutputPath` | `$(OutputPath)docs/commandline/` | The directory to save the generated documetation to. |
| `GenerateCommandLineDocumentationOnBuild` | `false` | Set to `true` to automatically generate command line documentation when the project is built. |
| `MdDocsMarkdownPreset` | `Default` | Specify the "preset" to use for the generated markdown. Valid values: `Default`, `MkDocs` |

**Note:** If the output directory already exists, all files in the output
directory will be deleted.

For an example of what the output looks like, have a look at the
[demo project](./demoprojects/commandline/index.md).
57 changes: 57 additions & 0 deletions docs/net-cli-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# MdDocs .NET CLI tool

## Installation

*MdDocs* is a distributed as NuGet packages.

- Prerelease builds are available on [MyGet](https://www.myget.org/feed/ap0llo-mddocs/package/nuget/Grynwald.Utilities)
- Release versions are available on [NuGet.org](https://www.nuget.org/packages/Grynwald.MdDocs)

MdDocs can be used either as .NET Core CLI tool or integrated into
the project build as a set of MSBuild targets (see [MdDocs MSBuild-integration](./msbuild-integration.md)).

[![NuGet](https://img.shields.io/nuget/v/Grynwald.MdDocs.svg)](https://www.nuget.org/packages/Grynwald.MdDocs)

The package `Grynwald.MdDocs` provides MdDocs as a .NET Core (global) tool.
To install it, run

```ps1
dotnet tool install --global Grynwald.MdDocs
```

## Usage

See also: [Command Line Reference](docs/commandline/index.md)

### API Reference

To generate API reference documentation for a .NET assembly, run:

```ps1
mddocs apireference --assembly <PATH-TO-ASSEMBLY> --outdir <OUTPUT-DIRECTORY>
```

**Note:** If the output directory already exists, all files in the output
directory will be deleted.

For an example of what the output looks like, have a look at the
[demo project](./demoprojects/api/DemoProject/index.md).

For a list of supported documentation tags, see
[Supported documentation tags](./apireference/tags.md).

### Command Line Help

To generate command line help for .NET console application implemented using
the [CommandLineParser package](https://www.nuget.org/packages/CommandLineParser/),
run:

```ps1
mddocs commandlinehelp --assembly <PATH-TO-ASSEMBLY> --outdir <OUTPUT-DIRECTORY>
```

**Note:** If the output directory already exists, all files in the output
directory will be deleted.

For an example of what the output looks like, have a look at the
[demo project](./demoprojects/commandline/index.md).

0 comments on commit 82fe64d

Please sign in to comment.