Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added v4 template to the main repo #825

Merged
merged 17 commits into from
Jun 5, 2020
Merged

Added v4 template to the main repo #825

merged 17 commits into from
Jun 5, 2020

Conversation

Barsonax
Copy link
Member

@Barsonax Barsonax commented May 24, 2020

Project generates a zip on build with the files from the template which can be used directly without other tools other than something to unpack it.

When you pack it it generates a nuget package that can be used with dotnet new. You can install it from nuget but you can also install it directly from a file path which is handy when testing:

dotnet new -i C:\git\duality\Source\DualityTemplates\bin\AdamsLair.Duality.Templates.4.0.0-alpha

Then create the folder for the solution, navigate to it and create the solution:

mkdir FlappyBird
cd FlappyBird
dotnet new dualitysolution --allow-scripts yes

This also builds the solution so you can use duality straight away (will probably fail if you do not have a localfeed setup with duality 4.0.0-alpha). It will get the name from the folder name but you can also specify it yourself with the --name parameter.

The nuget package is a template pack so it is possible to add multiple templates in the future (like a core plugin template, editor plugin template etc). Hence the naming is also generic.

To update the template just install it again with dotnet new -i

There is currently no integration with the nightly builder yet so the above all still to be done manually but thats fine for now as thats the same as the old situation I believe.

NOTE: template assumes the new folder structure in #827

Known issues

  • Name of the project you create with the template cannot contain spaces or dots. Not a very big issue but we might wanna look into solving this in a nice way for the future. In case you don't supply a name yourself it will take the name of the current folder so that folder name cannot have spaces or dots either then.

@Barsonax Barsonax requested a review from SirePi May 24, 2020 15:37
@Barsonax Barsonax linked an issue May 24, 2020 that may be closed by this pull request
@Barsonax Barsonax requested a review from ilexp May 24, 2020 15:42
@Barsonax Barsonax linked an issue May 24, 2020 that may be closed by this pull request
@ilexp
Copy link
Member

ilexp commented May 30, 2020

Since #823 was superseded by #827, is this template still up-to-date?

@Barsonax
Copy link
Member Author

Barsonax commented May 30, 2020

No it has to be updated which I will when that other PR is merged. Don't have time atm though but maybe in the coming days.

@Barsonax
Copy link
Member Author

Barsonax commented Jun 2, 2020

@ilexp I updated the template with the new paths.

@Barsonax
Copy link
Member Author

Barsonax commented Jun 5, 2020

@ilexp @SirePi Can anyone give this a review so this can be merged?

Copy link
Member

@SirePi SirePi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok

@Barsonax Barsonax merged commit f4b7ef5 into master Jun 5, 2020
@Barsonax Barsonax deleted the feature/newv4template branch June 12, 2020 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add v4 template project Figure out a good way to distribute the new duality template
3 participants