-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add example locations #16
Merged
sindresorhus
merged 9 commits into
sindresorhus:main
from
borekb:15-document-pathsconfig
Mar 8, 2021
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3ac82c3
Add example locations of paths.config
borekb 5c41b38
Update paths.config Windows example
borekb f4f8c05
Add examples to path.data, .cache, .log and .temp
borekb 4546c80
Change "e.g." to "for example"
borekb a3ea6d8
Fix typo
borekb ff5b24a
Fix .temp Linux example
borekb 2fff90a
Add examples to index.d.ts
borekb 0b20ba6
Fix example in index.d.ts
borekb cbefe18
Slightly update docs in index.d.ts
borekb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be useful to also show an example of the full resolved path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My rationale for
%APPDATA%
is that it's better / easier to read thanC:\Users\sindresorhus\AppData\Roaming
(and even that depends on the Windows version I believe).While we're at it, do you think
~
is fine? I prefer~/Library/Preferences/MyApp-nodejs
over/Users/sindresorhus/Library/Preferences/MyApp-nodejs
but it's a similar issue as with%APPDATA%
. Overall, my preference is towards shorter, more generic examples where possible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I meant just showing an example of the resolved path afterwards.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, so what do you mean by "resolved path"?
paths.config
is a directory so examples like~/Library/Preferences/MyApp-nodejs
or%APPDATA%\MyApp-nodejs\Config
are already fully resolved, aren't they?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From experience, people know what
~
resolves to, but it's not always clear what%APPDATA
resolves to.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I've changed the format and also documented the other properties, see
readme.md
as of f4f8c05.It would be great if you could double-check the actual values, for example, I'm not that sure that
.temp
examples are fully correct on Windows & Linux. But if you could review the other as well that would be great 🙏.After this is checked, I'll be happy to update the
.d.ts
file as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all in the code. I don't have a Linux or Windows system to test on right now. The Linux one for temp looks incorrect from a quick look as (per the code) it should include the username.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to work with the source code closely, for all the examples, I hope that
.temp
is the only one I missed – you're right, it should contain username. For example, https://runkit.com/embed/kefcnj8b9f7d.Fixed in ff5b24a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 2fff90a.