cached_build_runner
透過快取未變更的 .dart 檔案產生的程式碼,協助優化 build_runner
- 星標
- 19
- 分支
- 10
- 最近推送(UTC)
- 2024年5月5日
- 專案狀態
- 未封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
Cached Build Runner
Cached Build Runner is a Dart package that optimizes the build_runner by caching generated code for unchanged .dart files. This package can be used as a dev_dependency and provides a cached version of the build_runner, which caches generated files instead of generating them every time.
Usage
cached_build_runner <command> [arguments]
Commands
Global options: -h, --help Print this usage information.
Available commands:
- build: Performs a single build on the specified targets and then exits.
- watch: Builds the specified targets, watching the file system for updates and rebuilding as appropriate.
- cache: Commands for manipulating cache.
Available arguments:
- -h, --help: Print out usage instructions.
- -v, --verbose: Enables verbose logs.
- -d, --debug: Enables even more verbose logs.
- -p, --[no]prune: Enable pruning cache directory when pubspec.lock was changed since last build. Defaults true.
- -c, --cache-directory: Provide the directory where this tool can keep the caches.
Cache sub-commands
- prune: Clear cache directory.
- list: List table of files with hash (digest) and their dirty state.
arguments
- -h, --help: Print out usage instructions.
- -v, --verbose: Enables verbose logs.
- -c, --cache-directory: Provide the directory where this tool can keep the caches.
Installation
Add the package to your pubspec.yaml file under dev_dependencies:
dev_dependencies:
build_runner: ^latest_version
cached_build_runner: ^latest_version
Please note that you have to add build_runner as a mandatory dependency in your project for cached_build_runner to work properly.
Replace latest_version with the latest available version of the package.
Original work done by @jyotirmoy-paul.
分類
使用的依賴
如何選擇適合專案的儲存庫?
先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
- 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
- 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
- 使用前在 GitHub 確認 README、授權條款與 Issues。
來源與維護
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗