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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ fs.src(['*.js', '!b*.js'])
- Default is `process.cwd()`.

- base - Specify the folder relative to the cwd. This is used to determine the file names when saving in `.dest()`.
- 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`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought I'd add an example, especially since the second point to this behaves differently and also has an example.

- 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.


- buffer - `true` or `false` if you want to buffer the file.
- Default value is `true`.
Expand Down