如何从 gulp 的解析中排除 node_modules 的许多目录?
How to exclude many directories of node_modules from parsing for gulp?
我的项目有一个模块化结构,每个模块中都有一个目录 node_modules。我想使用 gulp 进行自动化。许多任务需要解析目录,我想从可用目录中排除 node_modules。例如,我有以下结构:
node_modules
someFolder / node_modules
xFolder / yFolder / node_modules
aFolder / bFolder / dFolder / node_modules
如果我想排除顶层的节点模块,那么我指定
"!node_modules/**/*"
但是如何排除 node_modules 的嵌套目录?
我不熟悉 gulp 的自动化,但看起来它允许 globbing 语法。您是否尝试过类似 "!**/node_modules/**/*"
的方法?
我的项目有一个模块化结构,每个模块中都有一个目录 node_modules。我想使用 gulp 进行自动化。许多任务需要解析目录,我想从可用目录中排除 node_modules。例如,我有以下结构:
node_modules
someFolder / node_modules
xFolder / yFolder / node_modules
aFolder / bFolder / dFolder / node_modules
如果我想排除顶层的节点模块,那么我指定
"!node_modules/**/*"
但是如何排除 node_modules 的嵌套目录?
我不熟悉 gulp 的自动化,但看起来它允许 globbing 语法。您是否尝试过类似 "!**/node_modules/**/*"
的方法?