https://github.com/netglade/cached_build_runner
Helps to optimize the build_runner by caching generated codes for non changed .dart files
https://github.com/netglade/cached_build_runner
build-runner cache dart flutter
Last synced: 6 months ago
JSON representation
Helps to optimize the build_runner by caching generated codes for non changed .dart files
- Host: GitHub
- URL: https://github.com/netglade/cached_build_runner
- Owner: netglade
- License: mit
- Created: 2023-03-03T04:25:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-05T17:27:27.000Z (about 2 years ago)
- Last Synced: 2025-07-15T04:16:42.366Z (about 1 year ago)
- Topics: build-runner, cache, dart, flutter
- Language: Dart
- Homepage: https://pub.dev/packages/cached_build_runner
- Size: 133 KB
- Stars: 19
- Watchers: 4
- Forks: 10
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
cached_build_runner [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:
```yaml
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.