Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Vue template #753

Closed
wants to merge 4 commits into from
Closed

Vue template #753

wants to merge 4 commits into from

Conversation

SteveSandersonMS
Copy link
Member

@SteveSandersonMS SteveSandersonMS commented Mar 10, 2017

As per all the requests in #524, here's a PR that adds a Vue.js template. This takes inspiration in various ways from @MarkPieszak's aspnetcore-Vue-starter, but also has some differences:

  • This one uses TypeScript for consistency with all the other templates. It also uses av-ts to coerce Vue's APIs into a more class-like shape.
  • This one does not use Vuex, just to keep things simple and approachable. Experienced Vue devs can of course add Vuex or anything similar if they want.

I'm putting this here as a PR in case anyone who is particularly familiar with Vue has comments on the approach or can suggest improvements.

Why there's no server-side prerendering

I did set it up with server-side prerendering. If you want that, look at commit 2067ea2. But then when trying to add a reference to node-fetch (so that API calls can occur on the server too), I realised there were some severe limitations, so I removed server-side prerendering support. See #754 for details of these issues - when people ask for server-side Vue rendering, we can point them to that issue. Hopefully, someone more involved in the Vue project might be able to suggest solutions or to fix the underlying limitations in Vue's approach to SSR.

@MarkPieszak
Copy link
Contributor

Glad to of helped! I was originally going to go all TypeScript as well, but we stuck with ES6 just because it seems that the Vue community usually uses ES5 (sometimes 6), and I can't recommend anyone use ES5 (that's just crazy) :)

At least everyone will have both options now! I'll make sure to label mine ES6.
Do you want to link it somewhere in this Repo for others?

Also, I need to finally take the time to push my repos to dotnet template, if you have any great reference on how to do it that'd be amazing! Thanks @SteveSandersonMS 🥇

@SteveSandersonMS
Copy link
Member Author

Merged.

@SteveSandersonMS
Copy link
Member Author

At least everyone will have both options now! I'll make sure to label mine ES6.
Do you want to link it somewhere in this Repo for others?

Do you want to add it to the wiki? https://github.com/aspnet/JavaScriptServices/wiki

Also, I need to finally take the time to push my repos to dotnet template, if you have any great reference on how to do it that'd be amazing!

There are a few blog posts going around on this subject, e.g., http://dotnetthoughts.net/create-a-dot-net-new-project-template-in-dot-net-core/

@MarkPieszak
Copy link
Contributor

I don't have write access to add anything in there :( @SteveSandersonMS

@SteveSandersonMS
Copy link
Member Author

Sorry - I thought it was world-writable. Also I don't have permission to add permissions :( So I've added the link myself.

@MarkPieszak
Copy link
Contributor

Yeah for some reason doesn't show you as a Member of ASPNET even though I know you are! Strange 😆

Going to link to this one for the TypeScript version.

Thanks again Steve, hope all is well over in the UK.

@SteveSandersonMS
Copy link
Member Author

doesn't show you as a Member of ASPNET

The membership was set to 'private' for some reason. I have now changed it to 'public'.

@MarkPieszak
Copy link
Contributor

There it is! :)

@SteveSandersonMS SteveSandersonMS deleted the vue-template branch July 11, 2017 09:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants