rastapasta / mapscii

🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <= on Mac (brew install telnet) and Linux, connect with PuTTY on Windows
MIT License
7.96k stars 257 forks source link

user configurable config file #89

Closed iandstanley closed 4 years ago

iandstanley commented 4 years ago

The problem

creating config and cache directories in $HOME quickly ends up with a cluttered $HOME by the time you have several apps running

I would like to see an option to user define the data/cache directory used

Proposed solution

one newer solution is to check the environment to see if $XDG_CACHE_HOME is defined and if so create a subdirectory under it named after the app and put any cache data there

see

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Alternative solutions

some developers solve it with an ENV variable pointing to the cache/data/config directories

others have a command line switch to define such a directory

Additional context

thanks for taking the time to read this

derhuerst commented 4 years ago

related: #60

env-paths intends to help the Node.js ecosystem adhere to best practices.

jaller94 commented 4 years ago

Sure, if env-paths solves our troubles, I'm going to implement that tonight.

jaller94 commented 4 years ago

Please have a look at #91 and tell me if this fixes your issue.