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

Follow XDG specification on Linux #4569

Closed
lunush opened this issue Jun 7, 2021 · 2 comments · Fixed by #4650
Closed

Follow XDG specification on Linux #4569

lunush opened this issue Jun 7, 2021 · 2 comments · Fixed by #4650
Assignees
Labels

Comments

@lunush
Copy link

lunush commented Jun 7, 2021

What version of Tailwind CSS are you using?

v2.1.2

Describe your issue

On Linux, there is XDG Base Directory Specification that almost all modern software follow. The specification helps declutter the home directory and manage program-specific files more easily.

When using tailwind, it creates a folder ~/.tailwindcss with what I believe are cache-related files. If I am correct, the files should be located at ~/.cache/tailwindcss.

@frankdugan3
Copy link

frankdugan3 commented Jun 11, 2021

TLDR: For cache, the spec defines

$XDG_CACHE_HOME defines the base directory relative to which user-specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used.

RobinMalfait added a commit that referenced this issue Jun 15, 2021
When more tools catch up with the latest postcss dependency tracking,
then we probably don't even need this anymore. However, it is a good
practice to put (global) caches in ~/.cache and (global) configs in
~/.config

Fixes: #4569
@RobinMalfait
Copy link
Contributor

Hey! Thank you for your suggestion!
Much appreciated! 🙏

There is a probably going to be a time in the future where we don't even need this folder anymore, now that tools are shipping with the latest postcss version that supports better dependency tracking.

That said, I opened a pr (#4650) that changes the default folder for this.
Once that PR is merged, this issue will be closed.

Thanks!

@RobinMalfait RobinMalfait self-assigned this Jun 15, 2021
adamwathan pushed a commit that referenced this issue Jun 15, 2021
* use `~/.cache/tailwindcss` as default touch dir

When more tools catch up with the latest postcss dependency tracking,
then we probably don't even need this anymore. However, it is a good
practice to put (global) caches in ~/.cache and (global) configs in
~/.config

Fixes: #4569

* change test to verify @tailwind base slightly

Because of some changes in tailwind itself, the base selector contains a
ton of new --tw-* custom properties. Keeping this up to date might be a
bit of an annoying challenge. So instead we now check for the selector
to be present.

* add `tmp` package

* use a (simple) temporary file, instead of a full cache dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants