turbo prune <scope>...
ターゲットワークスペースの、縮小されたロックファイルを含むスパース/部分的なモノレポを生成します。
このコマンドは、以下を含む「out
」という名前のフォルダーを生成します。
- ターゲットのビルドに必要なすべての内部ワークスペースの完全なソースコード
- 縮小されたワークスペース内のパッケージによって実際に使用される依存関係のみを含む、元のルートロックファイルの縮小されたサブセットのみを含む新しい縮小されたロックファイル。
- ルートの
package.json
のコピー
. # Folder full source code for all workspaces needed to build the target
├── package.json # The root `package.json`
├── packages
│ ├── ui
│ │ ├── package.json
│ │ ├── src
│ │ │ └── index.tsx
│ │ └── tsconfig.json
│ ├── shared
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── __tests__
│ │ │ │ ├── sum.test.ts
│ │ │ │ └── tsconfig.json
│ │ │ ├── index.ts
│ │ │ └── sum.ts
│ │ └── tsconfig.json
│ └── frontend
│ ├── next-env.d.ts
│ ├── next.config.js
│ ├── package.json
│ ├── src
│ │ └── pages
│ │ └── index.tsx
│ └── tsconfig.json
└── yarn.lock # The pruned lockfile for all targets in the subworkspace
オプション
--docker
型: boolean
デフォルトは false
です。このフラグを渡すと、Docker のベストプラクティス/レイヤーキャッシングでより簡単に使用できるように、縮小されたワークスペースを含む出力フォルダーが変更されます。 (新しいタブで開きます)。
--docker
フラグを使用すると、prune
コマンドは、以下を含む「out
」という名前のフォルダーを生成します。
json
フォルダー。縮小されたワークスペースのpackage.json
full
フォルダー。縮小されたワークスペースの完全なソースコードですが、ターゲットのビルドに必要な内部パッケージのみが含まれます。- 縮小されたワークスペース内のパッケージによって実際に使用される依存関係のみを含む、元のルートロックファイルの縮小されたサブセットのみを含む新しい縮小されたロックファイル。
.
├── full # Folder full source code for all package needed to build the target
│ ├── package.json
│ └── packages
│ ├── ui
│ │ ├── package.json
│ │ ├── src
│ │ │ └── index.tsx
│ │ └── tsconfig.json
│ ├── shared
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── __tests__
│ │ │ │ ├── sum.test.ts
│ │ │ │ └── tsconfig.json
│ │ │ ├── index.ts
│ │ │ └── sum.ts
│ │ └── tsconfig.json
│ └── frontend
│ ├── next-env.d.ts
│ ├── next.config.js
│ ├── package.json
│ ├── src
│ │ └── pages
│ │ └── index.tsx
│ └── tsconfig.json
├── json # Folder containing just package.jsons for all targets in the subworkspace
│ ├── package.json
│ └── packages
│ ├── ui
│ │ └── package.json
│ ├── shared
│ │ └── package.json
│ └── frontend
│ └── package.json
└── yarn.lock # The pruned lockfile for all targets in the subworkspace
--out-dir
デフォルト: ./out
縮小された出力が生成されるディレクトリをカスタマイズします。