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

Adhere to XDG Base Desktop Specification #1253

Closed
hyperupcall opened this issue Jun 24, 2020 · 3 comments
Closed

Adhere to XDG Base Desktop Specification #1253

hyperupcall opened this issue Jun 24, 2020 · 3 comments
Labels

Comments

@hyperupcall
Copy link

Type of issue

haii,
i was wondering if there is any interest to adhere to the xdg base desktop specification (on linux), even if it's just a little bit? right now i see a ~/.yo-rc-global.json file created in the home directory. i mainly would like to see it in $XDG_CONFIG_HOME/yeoman/yo-rc-global.json (~/.config/yeoman/yo-rc-global.json) to clean up the home directory. i think it would be best for compatibility if we read make the config resolve to $XDG_CONFIG_HOME/yeoman/yo-rc-global.json, but only if the ~/.yo-rc-global.json file doesn't exist - thoughts?. i can make a pr if needed :) more info on the xdg base directory specification can be found here

thankies,
edwin

@mshima mshima transferred this issue from yeoman/yo Jun 24, 2020
@mshima mshima transferred this issue from yeoman/environment Jun 24, 2020
@mshima
Copy link
Member

mshima commented Jun 24, 2020

@eankeen seems like yo never writes to .yo-rc-global.json.
Fell free to create a PR here at generator first, then you can update yo to read from the updated version.

@mshima
Copy link
Member

mshima commented Jun 24, 2020

If an old generator is called, it will keep writing to $home/.yo-rc-global.json.
So:

  • generator 1 till 4.11.0 will write exclusively to $home/.yo-rc-global.json.
  • generator 4.11.0 < x < 5 should write to $home/.yo-rc-global.json if it contains the generator namespace, otherwise it should write to ~/.config/yeoman/yo-rc-global.json
  • generator >= 5 should move the generator namespace to ~/.config/yeoman/yo-rc-global.json if it exist at $home/.yo-rc-global.json and don't exists at ~/.config/yeoman/yo-rc-global.json

yo should do a simple merge between both configs.

$home/.yo-rc-global.json will not exist if every generator is >4.11.0

I am going to release 4.11.0 tomorrow, I can do a 4.12.0 for this feature, otherwise this will be last 4.x release.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2020

This issue is stale because it has been open more than 45 days with no activity. Remove stale label or comment or this will be closed in 15 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants