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

#129 - Update documentation to more clearly explain what happens for default base option values. #130

Merged
merged 1 commit into from
Dec 16, 2015

Conversation

treshugart
Copy link
Contributor

After discussing it with @phated in #129, it seems to me that the previous description of the default base value is incorrect in the docs. I was originally unsure where the source of truth was (docs or code) but it seems that the code is correct.

- Default is where the glob begins if any.
- Default is `process.cwd()` if there is no glob.
- Default is where the glob begins, if any. For example, `path/to/**/*.js` would resolve to `path/to`.
- If there is no glob (i.e. a file path with no pattern), then the dirname of the path is used. For example, `path/to/some/file.js` would resolve to `path/to/some`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sort of an implementation detail in that glob2base is used (and that glob-parent may be used in the future), however this hopefully better describes what happens even if it doesn't describe exactly what glob2base is doing internally.

@phated
Copy link
Member

phated commented Dec 16, 2015

Thanks!

phated added a commit that referenced this pull request Dec 16, 2015
#129 - Update documentation to more clearly explain what happens for default base option values.
@phated phated merged commit f51e567 into gulpjs:master Dec 16, 2015
phated added a commit that referenced this pull request Dec 5, 2017
#129 - Update documentation to more clearly explain what happens for default base option values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants