> For the complete documentation index, see [llms.txt](https://typescript-jp.gitbook.io/deep-dive/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://typescript-jp.gitbook.io/deep-dive/project/compilation-context/files.md).

# コンパイル対象ファイルの設定

`include`と`exclude`を使い、ファイル/フォルダ/グロブ(glob)を指定します。例:

```javascript
{
    "include":[
        "./folder"
    ],
    "exclude":[
        "./folder/**/*.spec.ts",
        "./folder/someSubFolder"
    ]
}
```

## グロブ(glob)

* グロブ(globs)の場合：`**/*`(例えば、サンプル使用法 `somefolder/**/*`)はすべてのフォルダとファイルを意味します(`.ts`/`.tsx`拡張子が対象になります。`allowJs:true`を設定した場合は`.js`/`.jsx`)。

## `files`オプション

明示的に `files`を使うこともできます：

```javascript
{
    "files":[
        "./some/file.ts"
    ]
}
```

ただし、指定したファイルを更新し続ける必要があるためおすすめしません。代わりに`include`を使用して指定したいファイルがあるフォルダを追加してください。
