fast-glob
fast-glob copied to clipboard
Add base path of entry for objectMode
What is the purpose of this pull request?
For objectMode
the base path of entry should be return, otherwise we can't get the base path through the results.
What changes did you make? (Give an overview)
- add
base
property forEntry
- add
basePath
param forEntryTransformer.getTransformer(basePath: string)
/azp run benchmark.regression.object
/azp run benchmark.regression
Can you give me some idea how you will use this opportunity?
Can you give me some idea how you will use this opportunity?
I want to implement a function like gulp.src
:
function copy (src, dest) {
...
}
copy(['input/*.js'], 'output');
// input/a.js => output/a.js
My current vision for the development of this package does not involve adding this field to Entry
. If you cannot use path.dirname
or always require base
, I suggest opening an issue with examples of why this is necessary.