I have an app.yaml
file in which I want to skip the entire node_modules
directory save for one file I added called helpers.js
. Currently my file looks like this:
我有一个app.yaml文件,其中我想跳过整个node_modules目录,保存我添加的一个名为helpers.js的文件。目前我的文件看起来像这样:
runtime: nodejs
vm: true
skip_files:
- ^node_modules$
What's the best way of skipping the entire node_modules
directory except for helpers.js
?
跳过除helpers.js之外的整个node_modules目录的最佳方法是什么?
1 个解决方案
#1
5
It would appear you can just use a negative lookahead in your regex to do this:
看起来您可以在正则表达式中使用负向前瞻来执行此操作:
^node_modules/(?!node\.js$).*
*this post may be useful to you also.
*这篇文章也可能对您有用。
#1
5
It would appear you can just use a negative lookahead in your regex to do this:
看起来您可以在正则表达式中使用负向前瞻来执行此操作:
^node_modules/(?!node\.js$).*
*this post may be useful to you also.
*这篇文章也可能对您有用。