Enhance template tests and add dotnet cli APIs for new command #2636
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR enhances the code in
Fake.DotNet.Cli.IntegrationTests
project which test the FAKE template. The enhancement include adding a new APIs toFake.DotNet.Cli
to supportdotnet new
command. The APIs are as follows:dotnet new
A usage example is as follows:
DotNet.newFromTemplate "web" id
The command available options can be found at this documentation page. The supported options are:
--dry-run
--force
--language
--name
--no-update-check
--output
dotnet new --install
A usage example is as follows:
DotNet.installTemplate "fake-template" id
The command available options can be found at this documentation page. The supported options are:
nuget-source
dotnet new --uninstall
A usage example is as follows:
DotNet.uninstallTemplate "fake-template"
The uninstall command has no options.
Not sure if the naming of the APIs is descriptive and is good. If anyone has better ideas or suggestions. Please comment and review the changes.
Thanks
TODO
Feel free to open the PR and ask for help
New (API-)documentation for new features exist (Note: API-docs are enough, additional docs are in
help/markdown
)unit or integration test exists (or short reasoning why it doesn't make sense)
boy scout rule: "leave the code behind in a better state than you found it" (fix warnings, obsolete members or code-style in the places you worked in)
Fake 5 API guideline is honored