I'm psyched about deno
I like decentralized library , sandbox by default
Just some nitpick
Instead of polluting home directory with ~/.deno
Use XDG Base Directory Specification for linux
Use Mac OS specific locations https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html#//apple_ref/doc/uid/TP40010672-CH10-SW1
IMO for windows you should use %localappdata%/deno as cache directory.
We should use the directories crate:
```rust
use directories::ProjectDirs;
let cache_dir = match ProjectDirs::from("land", "ry", "deno") {
Some(proj_dirs) => proj_dirs.cache_dir(),
None => // fallback to ~/.deno
}
You can control location of deno directory with DENO_DIR. Check out this article for more info.
CC @ry
@bartlomieju It's not about configuring ENVIRONMENT , but playing nicely with current conventions, and out box experience
That, and DENO_DIR sounds like it鈥檚 not exclusively for caches. If deno at some point does something else with it than storing its history and cache files in it, it won鈥檛 be sufficient anymore, as the cache dir isn鈥檛 equal to e.g. the config dir.
OSs have standards for directories. There鈥檚 crates implementing those standards. The standards are there because e.g. cache dirs don鈥檛 need to be backed up and can be cleaned on low disk space. So they need to be followed.
Most helpful comment
IMO for windows you should use
%localappdata%/denoas cache directory.