跳至主要内容

.flowconfig [include]

.flowconfig 文件中的 [include] 部分告诉 Flow 包含指定的 文件或目录。包含目录会递归地包含该目录下的所有文件。只要符号链接指向也包含的文件或目录,就会跟随符号链接。include 部分中的每一行都是要包含的路径。这些路径可以相对于根目录或绝对路径,并且支持单星和双星通配符。

项目根目录(.flowconfig 所在的位置)会自动包含。

例如,如果 /path/to/root/.flowconfig 包含以下 [include] 部分

[include]
../externalFile.js
../externalDir/
../otherProject/*.js
../otherProject/**/coolStuff/

那么当 Flow 检查 /path/to/root 中的项目时,它将读取和监视

  1. /path/to/root/(自动包含)
  2. /path/to/externalFile.js
  3. /path/to/externalDir/
  4. /path/to/otherProject/ 中任何以 .js 结尾的文件
  5. /path/to/otherProject 下任何名为 coolStuff/ 的目录