ktools 1.1.0 copy "ktools: ^1.1.0" to clipboard
ktools: ^1.1.0 copied to clipboard

A command-line tool for generating Dart code from assets and translations.

example/example.md

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.assets is a list of asset paths to ignore.
  • ignore.languages is a list of language codes to ignore in translations.
  • translations is the path to the translations directory.
  • output.assets is the path to the generated assets Dart file.
  • output.translations is the path to the generated translations Dart file.
5
likes
160
points
29
downloads

Publisher

verified publisherkalucky0.dev

Weekly Downloads

A command-line tool for generating Dart code from assets and translations.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

class_generator, yaml

More

Packages that depend on ktools