ktools 1.1.0
ktools: ^1.1.0 copied to clipboard
A command-line tool for generating Dart code from assets and translations.
Usage #
First, add KTools to your pubspec.yaml:
dev_dependencies:
ktools: ^1.0.0
Then, run the following command to generate code:
dart run ktools [action]
This will generate Dart code for your assets or translations, which you can then use in your application.
Configuration #
You can configure KTools through the pubspec.yaml file. Here is an example configuration:
ktools:
ignore:
assets: ['path/to/ignore']
languages: ['en', 'es']
translations: 'path/to/translations'
output:
assets: 'lib/gen/assets.g.dart'
translations: 'lib/gen/translations.g.dart'
In this configuration:
ignore.assetsis a list of asset paths to ignore.ignore.languagesis a list of language codes to ignore in translations.translations isthe path to the translations directory.output.assetsis the path to the generated assets Dart file.output.translationsis the path to the generated translations Dart file.