TrilonIO / aspnetcore-Vue-starter

*NEW* Asp.net Core & Vue.js (ES6) SPA Starter kit - Vuex, webpack, Web API, Docker, and more! By @TrilonIO
https://www.trilon.io
MIT License
1.22k stars 266 forks source link

dotnet new template #73

Closed mika76 closed 6 years ago

mika76 commented 6 years ago

I've generated the dotnet new template of the current repo. (re #28)

I've also uploaded a nuget at https://www.nuget.org/packages/aspnetcore-vuejs/1.0.0 (the ownership can be changed if you decide you like this)

This can be tested via dotnet new -i aspnetcore-vuejs

MarkPieszak commented 6 years ago

Wow @mika76 !! This is fantastic 👍 👍

You rock! Merging it in now

MarkPieszak commented 6 years ago

Let me know if there's anything else I need to do now to set any of that up! @mika76

mika76 commented 6 years ago

Cool glad you liked it 😊

I guess the readme should be updated (since cloning is not really necessary any more) and if you want to send me your email address of your nuget account I can add you as an owner (maybe dm me on twitter? @mladenm)

jbrunken commented 6 years ago

What is the proper way to use this when you're starting from zero?

When I run "dotnet new -i aspnetcore-vuejs" I get the following error:

Error: Package "aspnetcore-vuejs" is not a valid package specification

When I try to install the package using "nuget install aspnetcore-vuejs", I get the following error:

Package 'aspnetcore-vuejs 1.0.1' has a package type 'Template' that is not supported by project '/Users/Jason/AspNetProjects/VueTest/VueTest'.

I'm just getting started with Core and Vue.js, so I'm probably missing something obvious.

mika76 commented 6 years ago

@jbrunken that's interesting - when I copy paster the command from your issue it works fine. Maybe your dotnet is older? Maybe try updating it? or nuget?

mika76 commented 6 years ago

@jbrunken as you can see at https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new?tabs=netcore2x#template-options dotnet new -i option only came after dotnet core v2 not v1. So you probably need to update your dotnet core: https://www.microsoft.com/net/download

jbrunken commented 6 years ago

I am using the latest v2. I was able to get it working by cloning the repo and installing the package locally. I was trying to install it directly from NuGet before. I did run into some other issues as well, but I think they are all related to the fact that I'm running on a Mac. Anyway, thank you for the responses.

mika76 commented 6 years ago

@jbrunken I'm also on a mac and I cannot seem to find a problem - maybe re-initializing dotnet new would reset everything to work again? You could run dotnet new --debug:reinit which would clear out any non-standard templates and then re-install any custom ones again? (NOTE this will remove any non-standard templates from your new list)