Luke Pothier
Luke Pothier

Reputation: 1030

app.yaml skip_files skip an entire directory but one individual file

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:

runtime: nodejs
vm: true
skip_files:
 - ^node_modules$

What's the best way of skipping the entire node_modules directory except for helpers.js?

Upvotes: 7

Views: 6808

Answers (1)

Scott Weaver
Scott Weaver

Reputation: 7361

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.

Upvotes: 7

Related Questions