slang_build_runner
4.19.0, released 3 months ago by tienisto.com
build_runner integration for slang translation generation
What it does
Integrates the slang translation library into the standard Dart build_runner pipeline. It enables developers to generate type-safe localization files alongside other code generation tools. Configuration is handled through build.yaml instead of slang.yaml.
AI-written summary of version 4.19.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You use slang for translations and already use build_runner for other code generators
- You want a unified single-command build step for all project code generation
Skip it when
- You do not use build_runner and prefer slang's standalone CLI tool
- You are not using slang for localization
Strengths
- Combines translation generation into existing build_runner pipelines
- Includes a legacy fallback builder if build_runner asset writer issues occur
- Supports standard build.yaml builder configuration
Weaknesses
- The default builder has known issues with asset writing in some build configurations
- The legacy builder does not support build_runner build --workspace
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 4
Requires dev_dependencies on build_runner and slang_build_runner, configuration in build.yaml, and running build_runner build.
targets:
$default:
builders:
slang_build_runner:
options:
base_locale: enWorks with
Packages commonly used together with slang_build_runner: ones it builds on, ones built on it, and its own family.
- globslang_build_runner depends on itA file and directory globbing library that supports Bash-style path matching and listing.
- dart_styleslang_build_runner depends on itProvides an API and CLI to format Dart source code automatically.
- buildslang_build_runner depends on itPackage for authoring build_runner compatible code generators.
- slangslang_build_runner depends on itType-safe i18n solution generating Dart translation classes from JSON, YAML, CSV, or ARB files
- build_runnerUsed togetherA build system for Dart code generation and modular compilation.
- slang_flutterSame familyFlutter support for the slang localization library.
- slang_gptSame familyUse GPT to automatically translate slang localization files at compile time.