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
Takes a glob string or an array of glob strings as the first argument and an options object as the second.
42
42
Returns a stream of [vinyl]`File` objects.
43
43
44
-
__Note: UTF-8 BOM will be stripped from all UTF-8 files read with `.src` unless disabled in the options.__
44
+
__Note: UTF-8 BOM will be removed from all UTF-8 files read with `.src` unless disabled in the options.__
45
45
46
46
#### Globs
47
47
@@ -62,7 +62,7 @@ fs.src(['*.js', '!b*.js'])
62
62
#### Options
63
63
64
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.
65
+
- 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.
66
66
67
67
##### `options.buffer`
68
68
@@ -88,17 +88,17 @@ Type: `Date` or `Number`
88
88
89
89
Default: `undefined`
90
90
91
-
##### `options.stripBOM`
91
+
##### `options.removeBOM`
92
92
93
-
Causes the BOM to be stripped on UTF-8 encoded files. Set to `false` if you need the BOM for some reason.
93
+
Causes the BOM to be removed on UTF-8 encoded files. Set to `false` if you need the BOM for some reason.
94
94
95
95
Type: `Boolean`
96
96
97
97
Default: `true`
98
98
99
99
##### `options.sourcemaps`
100
100
101
-
Enables sourcemap support on files passed through the stream. Will load inline sourcemaps and resolve sourcemap links from files. Uses [gulp-sourcemaps] under the hood.
101
+
Enables sourcemap support on files passed through the stream. Will load inline sourcemaps and resolve sourcemap links from files.
102
102
103
103
Type: `Boolean`
104
104
@@ -114,7 +114,7 @@ Default: `true`
114
114
115
115
##### `options.dot`
116
116
117
-
Whether or not you want globs to match on dot files or not (e.g. `.gitignore`)
117
+
Whether or not you want globs to match on dot files or not (e.g. `.gitignore`). __Note: This option is not resolved from a function because it is passed verbatim to node-glob.__
118
118
119
119
Type: `Boolean`
120
120
@@ -173,44 +173,47 @@ Default: The process `mode`.
173
173
174
174
##### `options.overwrite`
175
175
176
-
Whether or not existing files with the same path should be overwritten. Can also be a function that takes in a file and returns `true` or `false`.
176
+
Whether or not existing files with the same path should be overwritten.
177
177
178
-
Type: `Boolean` or `Function`
178
+
Type: `Boolean`
179
179
180
180
Default: `true` (always overwrite existing files)
181
181
182
182
##### `options.sourcemaps`
183
183
184
184
Enables sourcemap support on files passed through the stream. Will write inline soucemaps if specified as `true`.
185
-
Specifying a `string`is shorthand for the path option. Uses [gulp-sourcemaps] under the hood.
185
+
Specifying a `string` path will write external sourcemaps at the given path.
186
186
187
187
Examples:
188
188
189
189
```js
190
190
// Write as inline comments
191
-
vfs.dest('./', {
192
-
sourcemaps:true
193
-
});
191
+
vfs.dest('./', { sourcemaps:true });
194
192
195
193
// Write as files in the same folder
196
-
vfs.dest('./', {
197
-
sourcemaps:'.'
198
-
});
199
-
200
-
// Any other options are passed through to [gulp-sourcemaps]
201
-
vfs.dest('./', {
202
-
sourcemaps: {
203
-
path:'.',
204
-
addComment:false,
205
-
includeContent:false
206
-
}
207
-
});
194
+
vfs.dest('./', { sourcemaps:'.' });
208
195
```
209
196
210
-
Type: `Boolean`, `String`or `Object`
197
+
Type: `Boolean`or `String`
211
198
212
199
Default: `undefined` (do not write sourcemaps)
213
200
201
+
##### `options.relativeSymlinks`
202
+
203
+
When creating a symlink, whether or not the created symlink should be relative. If `false`, the symlink will be absolute. __Note: This option will be ignored if a `junction` is being created.__
204
+
205
+
Type: `Boolean`
206
+
207
+
Default: `false`
208
+
209
+
##### `options.useJunctions`
210
+
211
+
When creating a symlink, whether or not a directory symlink should be created as a `junction`.
212
+
213
+
Type: `Boolean`
214
+
215
+
Default: `true` on Windows, `false` on all other platforms
216
+
214
217
### `symlink(folder[, options])`
215
218
216
219
Takes a folder path string or a function as the first argument and an options object as the second. If given a function, it will be called with each [vinyl]`File` object and must return a folder path.
@@ -234,6 +237,14 @@ Type: `String`
234
237
235
238
Default: `process.cwd()`
236
239
240
+
##### `options.mode`
241
+
242
+
The mode the symlinks should be created with.
243
+
244
+
Type: `Number`
245
+
246
+
Default: The `mode` of the input file (`file.stat.mode`) if any, or the process mode if the input file has no `mode` property.
247
+
237
248
##### `options.dirMode`
238
249
239
250
The mode the directory should be created with.
@@ -244,15 +255,15 @@ Default: The process mode.
244
255
245
256
##### `options.overwrite`
246
257
247
-
Whether or not existing files with the same path should be overwritten. Can also be a function that takes in a file and returns `true` or `false`.
258
+
Whether or not existing files with the same path should be overwritten.
248
259
249
-
Type: `Boolean` or `Function`
260
+
Type: `Boolean`
250
261
251
262
Default: `true` (always overwrite existing files)
252
263
253
-
##### `options.relative`
264
+
##### `options.relativeSymlinks`
254
265
255
-
Whether or not the symlink should be relative or absolute.
266
+
Whether or not the created symlinks should be relative. If `false`, the symlink will be absolute.__Note: This option will be ignored if a `junction` is being created.__
256
267
257
268
Type: `Boolean`
258
269
@@ -267,7 +278,6 @@ Type: `Boolean`
267
278
Default: `true` on Windows, `false` on all other platforms
0 commit comments