question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider removing template dirs in ~/.vue-templates/ when downloading updated templates

See original GitHub issue

Hello, I maintain a vue-cli template and I recently made some updates to make use of Vue’s new SSR features. Part of stealing Evan You’s code from the hackernews example involved renaming client-entry.js and server-entry.js to entry-client.js and entry-server.js respectively.

Upon testing out the newly pushed code, I discovered that vue-cli was still scaffolding client-entry.js and server-entry.js as well as entry-client.js and entry-server.js.

This problem was resolved by deleting the .vue-templates folder in my home dir.

I suspect this will become a bigger issue when any official/popular template renames (or possibly deletes) a file. And it will affect any user that used the template prior to the file changes.

Because of this, I think that at a minimum, a note about the .vue-templates dir should be added to the README - Though I believe this is a subpar solution as the user may not even be aware that there are problems/dead code.

I think, ideally, vue-cli should remove template dirs when downloading updated templates.

Thank vue very much for your time!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

1reaction
egoistcommented, Apr 21, 2017

Yeah, it should be removed before downloading new template, I guess https://github.com/flipxfx/download-git-repo/pull/12 would fix the issue.

1reaction
shailendhercommented, Apr 21, 2017

@Narkoleptika

Checking the hash would be a nice option. Here’s what I found: While github offers http API to get remote hash (example) there is no option in the local repo. This is because ‘download-git-repo’ use http/s protocol to download and extract the ‘master.zip’ (see here and here) And the solution will also have to work across all providers: github, gitlab, bitbucket etc…

Unless there is a better way, it’s best to limit the scope of this PR to fixing the issue with option 1 and optimize it later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User editable Vue template - Stack Overflow
I'd like the user to be able to edit these templates by dragging and dropping elements. I'm currently using vue-loader along with webpack...
Read more >
HTML and Static Assets - Vue CLI
The file public/index.html is a template that will be processed with html-webpack-plugin. During build, asset links will be injected ...
Read more >
Vue JS 3 Tutorial for Beginners #4 - The Vue CLI ... - YouTube
In this Vue 3 tutorial we'll use the Vue CLI to boilerplate a larger Vue ... We'll talk about vue files, templates &...
Read more >
Understand Routing in Vue.js With Examples | by SaidHayani
-rename HellowWorld.vue with home.vue ,remove all the code and replace it with this one . <template> <div class= ...
Read more >
4 Ways To Boost Your Vue.js App With Webpack
If you're only using render functions in your Vue app*, and no HTML templates, you don't need Vue's template compiler. You can reduce...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found