Vue-cli: Add `--use-cache` option

Created on 29 Dec 2016  路  10Comments  路  Source: vuejs/vue-cli

Maybe we can download the repo to ~/.vue-cli/repos instead of a random temp path so that we can use cached version later. 馃

How do you think?

discussion

Most helpful comment

I think this should just be by default and always check. This would also enable offline usage

All 10 comments

I think it's good idea. 馃憤

I think this should just be by default and always check. This would also enable offline usage

Use cache by default , --remote option to download remote repo, this may be better

Good idea.

@likun7981 I actually think we should always check and add an option for offline like yarn's --offline (only works if cached, no remote check). There's also --prefer-offline (download if no cache) which I don't think it's necessary since we should always check for the newest version and cache it. If we use the cache by default and make users use the --remote option manually to update, a lot of people will forget. However, if we have a remote first strategy, it'll work out of the box.

we can even add a vue cache update to update all templates cached and vue cache clear. But I don't think this is necessary since they update automatically

@posva your idea is nice , but sometimes , I just want to update the current one which I need .

@likun7981 That's what I was saying 馃槃 : vue init webpack test would try to update the cached version of the webpack template while vue init --offline webpack test would directly use the cached version

Sorry , that鈥檚 my fault 馃槀 , I just didn't completely understand your meaning. I understand now.
I just only saw vue cache update to update all templates

@likun7981 馃槅 No worries. I was just thinking out loud. I think we shouldn't add a vue cache update command

Was this page helpful?
0 / 5 - 0 ratings