conform to the linux XDG specification
See original GitHub issueVersion
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:
-
use
vue ui
to create a project with a manual preset and then saving the preset this should generate the file.vuerc
-
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
-
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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5
@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
I think
.vue-cli-ui
should end up inXDG_CACHE_HOME
(orXDG_DATA_HOME
) instead ofXDG_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 theirXDG_CONFIG_HOME
in version control).In addition, at least some of the keys that get saved in
.vuerc
are also not really applicable to theXDG_CONFIG_HOME
directory:latestVersion
andlastChecked
. These would make much more sense in a file inXDG_CACHE_HOME
.