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.

conform to the linux XDG specification

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

1reaction
RaafatTurkicommented, Aug 2, 2020

@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

1reaction
skipkayhilcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XDG Base Directory - ArchWiki
Application Legacy Path Supported Since ALSA ~/.asoundrc 577df36 · 1.2.3 Android Studio ~/.AndroidStudioX.X Android Studio 4.1 Anki ~/Anki , ~/Documents/Anki
Read more >
XDGBaseDirectorySpecification - Debian Wiki
The XDG Base Directory Specification (XDGBDS) defines four categories of so called DotFiles and the corresponding directories in a users home ...
Read more >
what is the XDG base directory specification ... - YouTube
today I talk about the XDG base directory specification and how an application might go about adhering to it (as well as some...
Read more >
Is the XDG base directory specification something to care about?
Anyway, pretty much everything on modern Linux conforms to XDG sepcification. Even Gnome got it almost right. So try to not break the...
Read more >
XDG Base Directory Specification
There is a set of preference ordered base directories relative to which configuration files should be searched. This set of directories is ...
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