Follow the XDG base directory specification #1076

Closed
arcresu opened this Issue Jun 4, 2013 · 7 comments

Comments

Projects
None yet
3 participants
@arcresu

arcresu commented Jun 4, 2013

Instead of polluting the home directory with ~/.yeoman, follow the XDG Base Directory Specification.

In particular, $XDG_CACHE_HOME/yeoman/ (defaults to $HOME/.cache/yeoman/) should be used instead of $HOME/.yeoman/cache/. As well as keeping the home directory clean, the semantic separation of config, runtime data, cache data and user-local software by the spec is helpful to users and other tools (e.g. backup software).

@passy

This comment has been minimized.

Show comment
Hide comment
@passy

passy Jun 4, 2013

Member

I didn't know we were still using ~/.yeoman for something.

@sindresorhus Do you know where/how this is used?

Member

passy commented Jun 4, 2013

I didn't know we were still using ~/.yeoman for something.

@sindresorhus Do you know where/how this is used?

@sindresorhus

This comment has been minimized.

Show comment
Hide comment
@sindresorhus

sindresorhus Jun 4, 2013

Member

I absolutely agree.

Looks like we're using it in:

lib/actions/actions.js
260:  var cache = path.join(home, '.yeoman/cache', username, repo, branch);
Member

sindresorhus commented Jun 4, 2013

I absolutely agree.

Looks like we're using it in:

lib/actions/actions.js
260:  var cache = path.join(home, '.yeoman/cache', username, repo, branch);
@passy

This comment has been minimized.

Show comment
Hide comment
@passy

passy Jun 4, 2013

Member

Do we need that persistent cache at all? Wouldn't it be sufficient to use a tmpdir and remove it once we're done?

Member

passy commented Jun 4, 2013

Do we need that persistent cache at all? Wouldn't it be sufficient to use a tmpdir and remove it once we're done?

@sindresorhus

This comment has been minimized.

Show comment
Hide comment
@sindresorhus

sindresorhus Jun 4, 2013

Member

Yeah, we don't want users having to wait for the generator to fetch the remote thing every time the generator is used.

Member

sindresorhus commented Jun 4, 2013

Yeah, we don't want users having to wait for the generator to fetch the remote thing every time the generator is used.

@passy

This comment has been minimized.

Show comment
Hide comment
@passy

passy Jun 4, 2013

Member

Hm, alright. I think it could make sense to have some reusable caching mechanism, that uses the correct paths. Something like this.cacheDir('fetch', username, repo, branch) that resolves to $XDG_CACHE_HOME/yeoman/fetch/... and creates the directories along the way.

Member

passy commented Jun 4, 2013

Hm, alright. I think it could make sense to have some reusable caching mechanism, that uses the correct paths. Something like this.cacheDir('fetch', username, repo, branch) that resolves to $XDG_CACHE_HOME/yeoman/fetch/... and creates the directories along the way.

@sindresorhus

This comment has been minimized.

Show comment
Hide comment
Member

sindresorhus commented Nov 6, 2013

@passy agreed.

@sindresorhus

This comment has been minimized.

Show comment
Hide comment
@sindresorhus

sindresorhus Oct 6, 2014

Member

This was fixed at some point.

Member

sindresorhus commented Oct 6, 2014

This was fixed at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment