Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dadhi/CsToMd
Browse files Browse the repository at this point in the history
  • Loading branch information
dadhi committed Sep 14, 2024
2 parents 0ba3bac + 4ea45e0 commit 31a1735
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: dadhi
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2020 Maksim Volkau
Copyright (c) 2018-2022 Maksim Volkau

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
- [CsToMd](#cstomd)
- [Idea and Overview](#idea-and-overview)
- [Dotnet CLI tool](#dotnet-cli-tool)
- [How to use](#how-to-use)
- [Ad-hoc document generation](#ad-hoc-document-generation)
- [Build integration](#build-integration)


## Idea and Overview

[![NuGet Badge](https://img.shields.io/nuget/v/dotnet-cstomd.svg)](https://nuget.org/packages/dotnet-cstomd)
Expand All @@ -20,7 +21,7 @@ You may check the DryIoc [documentation project](https://github.com/dadhi/DryIoc

The additional features since v1.2.0:

- Converting the section outlined with `//md{` and `//md}` comments int the [collapsed markdown details](https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab).
- Converting the section outlined with `//md{` and `//md}` comments into the [collapsed markdown details](https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab).
- The optional `cstomd.config` file in the folder with the lines starters to be removed completely from the generated documentation file.


Expand All @@ -33,17 +34,17 @@ I addition the dotnet tool enables the documentation development in the **Visual
![VSCode usage](https://github.com/dadhi/CsToMd/blob/master/screen3.png?raw=true)


### How to use
### Ad-hoc document generation

- Install the dotnet-cstomd globally from the nuget, e.g. in the shell of your choice `dotnet tool install --global dotnet-cstomd --version 2.0.1`. Now you can invoke `cstomd MyClass.cs` directly and get the `MyClass.md` output.
- Install the dotnet-cstomd globally from the nuget, e.g. in the shell of your choice `dotnet tool install --global dotnet-cstomd --version 1.2.1`. Now you can invoke `cstomd MyClass.cs` directly and get the `MyClass.md` output.


### Build integration

* Switch to your project: `cd path\to\MyProject`
* Add the tool manifest file: `dotnet new tool-manifest`
* Install the tool: `dotnet tool install --global dotnet-cstomd --version 1.2.1` (the manifest file will be updated and later used for restore)
* Add the section to you project:
* Install the tool: `dotnet tool install dotnet-cstomd --version 1.2.1` (the manifest file will be updated and later used for restore)
* Add the section to your project:

```xml
<ItemGroup>
Expand All @@ -56,11 +57,11 @@ I addition the dotnet tool enables the documentation development in the **Visual
```
You may check the DryIoc [documentation project file](https://github.com/dadhi/DryIoc/blob/6f466ee1b4fde548c7211ecb0a54655011f69e57/docs/DryIoc.Docs/DryIoc.Docs.csproj#L26) for the real-world case example.

* You may run the document generation target without the rest the build:
* You may run the document generation target without the rest of the build:
```
dotnet msbuild -target:MdGenerate path\to\MyProject\MyProject.csproj
```
You may create a helper `build_the_docs` file and store the command there.
You may create a helper shell script with the command above.


Here is the [MS tutorial](https://docs.microsoft.com/en-us/dotnet/core/tools/local-tools-how-to-use#:~:text=Create%20a%20manifest%20file,-To%20install%20a&text=The%20output%20indicates%20successful%20creation%20of%20the%20file.&text=The%20template%20%22Dotnet%20local%20tool%20manifest%20file%22%20was%20created%20successfully.&text=The%20tools%20listed%20in%20a,the%20one%20that%20contains%20the%20.) for installing and using the local tools.
Expand Down

0 comments on commit 31a1735

Please sign in to comment.