Comments (3)
Find this in https://github.com/isaacs/node-glob/blob/e3cdccc0e295c2e1d5f40cf74c73ea17a8319c5c/README.md#options
root The place where patterns starting with / will be mounted onto. Defaults to path.resolve(options.cwd, "/") (/ on Unix systems, and C:\ or some such on Windows.)
from glob-stream.
Here is a demo https://github.com/ifduyue/gulp-src-with-opts-cwd-and-root, and what I want to do:
$ tree this-is-root/
this-is-root/
├── a
├── b
└── c
├── d
└── e
1 directory, 4 files
Set directory this-is-a-root
as the root (like a chroot root
), so that every glob, not matter whether it start with /
or not, captures expected files under this-is-root
.
But it doesn't work. Below is the output of running gulp:
$ gulp
[01:00:16] Using gulpfile ~/workspace/github/gulp-src-with-opts-cwd-and-root/gulpfile.js
[01:00:16] Starting 'default'...
[01:00:16] glob is [ 'a', '/b', 'c/d', '/c/e' ]
[01:00:16] Finished 'default' after 16 ms
[01:00:16] { cwd: 'this-is-root' } 'captures' [ 'a', 'd' ]
[01:00:16] { root: 'this-is-root' } 'captures' [ 'this-is-root/b',
'../Users/d/workspace/github/gulp-src-with-opts-cwd-and-root/this-is-root/c/e' ]
[01:00:16] { cwd: 'this-is-root', root: 'this-is-root' } 'captures' [ 'this-is-root/b',
'../Users/d/workspace/github/gulp-src-with-opts-cwd-and-root/this-is-root/c/e' ]
It is expected that all the files under this-is-root
are captures by gulp.src
.
But the reality is no matter how I use a combination of the opts cwd
and root
, it only capture two files, not all four.
from glob-stream.
It seems both glob-stream and node-glob manipulate on globs
and opt.cwd
, and something happens.
from glob-stream.
Related Issues (20)
- Update pumpify HOT 3
- [SPAM] Update glob-parent dependency to 5.1.2 or higher HOT 1
- glob-parent version vulnerability
- Bump glob-parent to resolve ReDos Vulnerability HOT 1
- Dependency vulnerability - Glob-parent HOT 1
- Switch to streamx
- Investigate fast-glob HOT 2
- Lists only 16 or less files when a glob string including no globstar. HOT 15
- BUG: UNC paths aren't resolved correctly HOT 1
- Snyk High Vulnerability: through [email protected]
- Updating from v8.0.0 to v8.0.1 causes RangeError: Maximum call stack size exceeded HOT 11
- Gulp.dest fails to move files between filesystems in v5 HOT 1
- Gulp.src glob pattern fails in various edge situations HOT 3
- v5 becomes significantly slower if a lot of NPM packages are installed HOT 5
- Gulp v5.0.0. Problem via `src` usage with external `gulpfile.js` HOT 6
- Sourcing files from a folder that doesn't exist using a glob pattern gives a cryptic error instead of nothing happening HOT 6
- How can I use it with gulp? HOT 1
- Can't install glob-stream - ECONNRESET error HOT 1
- How to properly read chunks of all files content into a single stream? HOT 3
- npm audit returns errors. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glob-stream.