You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-15Lines changed: 11 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,21 +61,8 @@ fs.src(['*.js', '!b*.js'])
61
61
62
62
#### Options
63
63
64
-
##### `options.cwd`
65
-
66
-
The working directory the folder is relative to.
67
-
68
-
Type: `String`
69
-
70
-
Default: `process.cwd()`
71
-
72
-
##### `options.base`
73
-
74
-
The folder relative to the cwd. This is used to determine the file names when saving in `.dest()`.
75
-
76
-
Type: `String`
77
-
78
-
Default: The part of the path before the glob (if any) begins. 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`.
64
+
- Values passed to the options must be of the right type, otherwise they will be ignored.
65
+
- All options can be passed a function instead of a value. The function must return a value of the right type, otherwise it will be ignored.
79
66
80
67
##### `options.buffer`
81
68
@@ -145,6 +132,7 @@ Default: `false`
145
132
146
133
Any glob-related options are documented in [glob-stream] and [node-glob].
147
134
Any through2-related options are documented in [through2].
135
+
Those options are forwarded verbatim.
148
136
149
137
### `dest(folder[, options])`
150
138
@@ -165,6 +153,9 @@ __Note: The file will be modified after being written to this stream.__
165
153
166
154
#### Options
167
155
156
+
- Values passed to the options must be of the right type, otherwise they will be ignored.
157
+
- All options can be passed a function instead of a value. The function will be called with the [vinyl]`File` object as its only argument and must return a value of the right type for the option.
158
+
168
159
##### `options.cwd`
169
160
170
161
The working directory the folder is relative to.
@@ -240,6 +231,7 @@ Default: `undefined` (do not write sourcemaps)
240
231
##### other
241
232
242
233
Any through2-related options are documented in [through2].
234
+
Those options are forwarded verbatim.
243
235
244
236
### `symlink(folder[, options])`
245
237
@@ -251,6 +243,9 @@ __Note: The file will be modified after being written to this stream.__
251
243
252
244
#### Options
253
245
246
+
- Values passed to the options must be of the right type, otherwise they will be ignored.
247
+
- All options can be passed a function instead of a value. The function will be called with the [vinyl]`File` object as its only argument and must return a value of the right type for the option.
248
+
254
249
##### `options.cwd`
255
250
256
251
The working directory the folder is relative to.
@@ -278,6 +273,7 @@ Default: The process mode.
278
273
##### other
279
274
280
275
Any through2-related options are documented in [through2].
0 commit comments