app.yaml skip_files跳过整个目录但只有一个文件

Luk*_*ier 7 regex google-app-engine yaml

我有一个app.yaml文件,我想跳过整个node_modules目录保存我添加的一个文件调用helpers.js.目前我的文件看起来像这样:

runtime: nodejs
vm: true
skip_files:
 - ^node_modules$
Run Code Online (Sandbox Code Playgroud)

什么是跳过整个的最佳途径node_modules目录,除了helpers.js

Sco*_*ver 7

看起来您可以在正则表达式中使用负向前瞻来执行此操作:

^node_modules/(?!node\.js$).*
Run Code Online (Sandbox Code Playgroud)

*这篇文章也可能对您有用.