slang_build_runner 4.18.0 copy "slang_build_runner: ^4.18.0" to clipboard
slang_build_runner: ^4.18.0 copied to clipboard

build_runner integration for slang. This library ensures that slang is recognized by build_runner.

slang_build_runner #

build_runner support for slang.

Useful if you want to combine multiple code generators.

This library ensures that slang is recognized by build_runner.

# pubspec.yaml
dependencies:
  slang: <version>

dev_dependencies:
  build_runner: <version>
  slang_build_runner: <version>

Make sure to use build.yaml instead of slang.yaml.

# build.yaml
targets:
  $default:
    builders:
      slang_build_runner:
        options:
          base_locale: en

The generate command:

dart run build_runner build --delete-conflicting-outputs

Legacy builder #

Some users reported problems (e.g. Asset already exists) with the new builder that uses build_runner's asset writer.

If you need the old behavior where the files are written directly to disk via dart:io, you can opt into the legacy builder.

Note: It does not support build_runner build --workspace.

Disable the default builder and enable the legacy one:

# build.yaml
targets:
  $default:
    builders:
      slang_build_runner:
        enabled: false
      slang_build_runner:legacy:
        enabled: true
        options:
          base_locale: en
14
likes
160
points
96.9k
downloads

Documentation

API reference

Publisher

verified publishertienisto.com

Weekly Downloads

build_runner integration for slang. This library ensures that slang is recognized by build_runner.

Repository

License

MIT (license)

Dependencies

build, dart_style, glob, slang

More

Packages that depend on slang_build_runner