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

conform to the linux XDG specification #5649

Open
Tracked by #6064
RaafatTurki opened this issue Jul 5, 2020 · 5 comments
Open
Tracked by #6064

conform to the linux XDG specification #5649

RaafatTurki opened this issue Jul 5, 2020 · 5 comments
Labels
enhancement intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome.

Comments

@RaafatTurki
Copy link

RaafatTurki commented Jul 5, 2020

Version

4.4.6

Environment info

  System:
    OS: Linux 5.7 Arch Linux
    CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
  Binaries:
    Node: 14.5.0 - /usr/bin/node
    Yarn: Not Found
    npm: 6.14.5 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 78.0.1
  npmGlobalPackages:
    @vue/cli: 4.4.6

Steps to reproduce

Do any of the following:

  1. use vue ui to create a project with a manual preset and then saving the preset
    this should generate the file .vuerc

  2. use vue ui to manage a project and change the UI blocks to anything other than the default positions and sizes
    this should generate the file .vue-cli-ui

  3. use vue create to create a project from a template
    this should generate the folder .vue-templates/

What is expected?

The files and folders generated by the actions above should be placed in proper XDG specific directories, these are agreed upon and are used in most UNIX based desktops.

.vuerc             -->     $XDG_CONFIG_HOME/vue/config   (~/.config/vue/vuerc as fallback)
.vue-cli-ui        -->     $XDG_DATA_HOME/vue/ui_data   (~/.local/share/vue/cli-ui as fallback)
.vue-templates/    -->     $XDG_DATA_HOME/vue/templates   (~/.local/share/vue/templates/ as fallback)

What is actually happening?

All files and folder are generated and thrown into $HOME which makes it harder to manage and keep track of as well as serving to clutter the $HOME directory.


Here's a nice breakdown of the specification as well as the full version.
This is not a breaking change, Vue could always fallback to legacy paths if the XDG ones (or their fallbacks) fail.

@hongquan
Copy link

Agree with this. I just come back to VueJS for a while (last time is Vue 2.6), and found that this version put a configuration file directly to $HOME. So weird and make my home directory clutter. I planned to file a bug report and found this issue.

@haoqunjiang haoqunjiang added enhancement intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome. labels Jul 15, 2020
@skipkayhil
Copy link

skipkayhil commented Aug 1, 2020

I think .vue-cli-ui should end up in XDG_CACHE_HOME (or XDG_DATA_HOME) instead of XDG_CONFIG_HOME. From what I can tell, it contains json files specific to projects which don't make sense in a directory intended for configuration (especially when people put their XDG_CONFIG_HOME in version control).

In addition, at least some of the keys that get saved in .vuerc are also not really applicable to the XDG_CONFIG_HOME directory: latestVersion and lastChecked. These would make much more sense in a file in XDG_CACHE_HOME.

@RaafatTurki
Copy link
Author

@skipkayhil I do agree with what you said about .vue-cli-ui and ill be editing my issue accordingly.

However having a couple of unrelated keys in .vuerc doesn't mean that we should throw the whole file outside XDG_CONFIG_HOME, that file holds many main vue cli settings and would make sense to have in a version controlled XDG_CONFIG_HOME.

@skipkayhil
Copy link

However having a couple of unrelated keys in .vuerc doesn't mean that we should throw the whole file outside XDG_CONFIG_HOME, that file holds many main vue cli settings and would make sense to have in a version controlled XDG_CONFIG_HOME.

Oh yeah, I totally agree that the other keys make sense in there, just wanted to point out that some of them should possibly be moved.

@RaafatTurki
Copy link
Author

@skipkayhil Glad to be on the same page, I doubt they'd change the anatomy of their config files tho, let's hope this gets implemented in early Vue 3

@haoqunjiang haoqunjiang mentioned this issue Nov 17, 2020
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome.
Projects
None yet
Development

No branches or pull requests

4 participants