Post

You can now run pkg:build_version and pkg:build_cli in Dart without adding build_runner to your dev_dependencies! With Dart 3.12's `dart run pkg@`, both packages now work in two modes: as standard build_runner builders, or as standalone CLIs.

When to use which mode: • Standalone (`dart run pkg@`): all your generators run in separate files (even build_version + build_cli together). Drop build_runner, build_verify, and build.yaml! • build_runner: you use another pkg:build builder or share one .g.dart file.

0 reposts0 likes

Is this dual-mode model useful for your projects? Should we standardize this pattern (`build_runner` + standalone `dart run pkg@` with `--check`) for other standalone code generators in Dart? Curious which tools you'd want to run this way!