Young Living Dotnet Template
These dotnet new
templates for Young Living can be used to start a new project, or as a reference when upgrading an existing project.
- Repository: https://bitbucket.org/youngliving/dotnet-templates/src
- Documentation: https://docs.devops.youngliving.com/
Installation
The easiest way to get these templates on your local machine is to clone the repository and build the solution. The project file for the templates include a post build step which automatically installs the templates locally once they are built.
Install from terminal
aws codeartifact login --tool dotnet --repository youngliving --domain yl --domain-owner 534914120180 --region us-west-2
dotnet new -i Yleo.Dotnet.Templates
Usage
All switches can be combined in the same command.
NOTE: There is no way to add functionality to an existing project via dotnet new
For instance, if you want to add support for PostgreSQL with the --usePostgres switch to an existing project, you will need to manually modify your project to add that support.
List the available switches for the yl-project template
dotnet new yl-project --help
Basic Usage
Create a folder for your new project and run dotnet new yl-template
with the desired switches:
mkdir NewProject
cd NewProject
dotnet new yl-project --useReact --usePostgres --useMarten -n NewProject -o .
Switches
Switch | Description |
---|---|
--useReact | Adds a razzle based project into the ClientApp folder of the .App project. |
--useService | Creates a microservice .Service project that uses the Young Living microservice framework. The project is set up to be published to NuGet and can be referenced by other projects once built. |
--useApp | (default) Creates a .App project that supports YlMvc and authentication. |
--useMarten | Adds support to MartenDB to the .App project |
--usePostgres | Adds support for PostgreSQL databases to the .App project |
--useOracle | Adds support for Oracle databases to the .App project |
--useModuleFederation | Adds support for exporting React UI components from the razzle-based React app that can be included in other web projects. |
What Doesn't The Template Project Cover?
The template projects do not:
- setup bitbucket repositories
- setup git
- create deployments for AWS
- create new databases
All these functions are managed by the SRE team. Contact your team's SRE for help with the above. Contact your team's Core Engineer for help using the project template.
Examples
Module Federation with React
dotnet new yl-project -useReact --useModuleFederation -n MyApp -o .