-
-
Notifications
You must be signed in to change notification settings - Fork 40
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 stopAt
option
#54
Add stopAt
option
#54
Conversation
readme.md
Outdated
Type: `string`\ | ||
Default: `path.parse(cwd).root` | ||
|
||
The absolute path to the directory to stop the search before reaching root if there were no matches before the `stopAt` directory. |
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.
Why does it have to be an absolute path? I think you can just path.resolve(cwd, stopAt)
the input path you get from the user.
Thanks for working on this. You need to add types to index.d.ts too. |
Thanks for the feedback. Fixed both issues in: Could you please have a look? |
index.d.ts
Outdated
@@ -8,6 +8,8 @@ export const findUpStop: unique symbol; | |||
|
|||
export type Match = string | typeof findUpStop | undefined; | |||
|
|||
export type Options = LocatePathOptions & {stopAt?: string}; |
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.
The stopAt
option needs docs: https://github.com/sindresorhus/typescript-definition-style-guide
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.
Added docs:
c2134ed
Fixes #49.