Skip to content

Instantly share code, notes, and snippets.

@britannio
Last active September 23, 2022 10:37
Show Gist options
  • Save britannio/6bcfbd447315217aebe3bfcf511a40a6 to your computer and use it in GitHub Desktop.
Save britannio/6bcfbd447315217aebe3bfcf511a40a6 to your computer and use it in GitHub Desktop.
Example build.yaml config for https://pub.dev/packages/build_runner using ferry, moor, freezed, json_serializable and injectable
targets:
$default:
sources:
exclude:
- "**/components/**"
- "**/exceptions/**"
- "test/**"
builders:
gql_build|schema_builder:
enabled: true
generate_for:
- lib/core/graphql/**
gql_build|ast_builder:
enabled: true
generate_for:
- lib/core/graphql/**
gql_build|serializer_builder:
enabled: true
options:
schema: my_app_name|lib/core/graphql/schema.graphql
gql_build|data_builder:
enabled: true
generate_for:
- lib/core/graphql/**
options:
schema: my_app_name|lib/core/graphql/schema.graphql
gql_build|var_builder:
enabled: true
generate_for:
- lib/core/graphql/**
options:
schema: my_app_name|lib/core/graphql/schema.graphql
ferry_generator|req_builder:
enabled: true
generate_for:
- lib/core/graphql/**
options:
schema: my_app_name|lib/core/graphql/schema.graphql
built_value_generator|built_value:
generate_for:
- lib/core/graphql/**
moor_generator:
generate_for:
- lib/core/database/**
freezed:
generate_for:
- "**/models/**"
- "**/unions/**"
json_serializable:
generate_for:
- "**/models/**"
- "**/unions/**"
injectable_generator|injectable_config_builder:
generate_for:
- "lib/dependency_injection.dart"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment