fast-glob icon indicating copy to clipboard operation
fast-glob copied to clipboard

Add base path of entry for objectMode

Open helloyou2012 opened this issue 4 years ago • 4 comments

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 for Entry
  • add basePath param for EntryTransformer.getTransformer(basePath: string)

helloyou2012 avatar Aug 05 '19 08:08 helloyou2012

/azp run benchmark.regression.object

mrmlnc avatar Sep 05 '19 06:09 mrmlnc

/azp run benchmark.regression

mrmlnc avatar Sep 05 '19 06:09 mrmlnc

Can you give me some idea how you will use this opportunity?

mrmlnc avatar Sep 21 '19 09:09 mrmlnc

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

helloyou2012 avatar Sep 23 '19 02:09 helloyou2012

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.

mrmlnc avatar Apr 30 '23 11:04 mrmlnc