p-hatan/ mirror

pub repository

mirror.p-hatan.ir

build_config

0.1.0

Support for parsing `build.yaml` configuration.

Download archive

Readme

Customizing builds

Customizing the build behavior of a package is done by creating a build.yaml file, which describes your configuration.

Defining Builders to apply to dependents (similar to transformers)

If users of your package need to apply some code generation to their package, then you can define Builders and have those applied to packages with a dependency on yours.

Exposed Builders are configured in the builders section of the build.yaml. This is a map of builder names to configuration. Each builder config may contain the following keys:

  • target: The name of the target which defines contains the Builder class definition.
  • import: Required. The import uri that should be used to import the library containing the Builder class. This should always be a package: uri.
  • builder_factories: A List<String> which contains the names of the top-level methods in the imported library which are a function fitting the typedef Builder factoryName(List<String> args).
  • build_extensions: Required. A map from input extension to the list of output extensions that may be created for that input. This must match the merged buildExtensions maps from each Builder in builder_factories.

Example builders config:

targets:
  # The target containing the builder sources.
  _my_builder: # By convention, this is private
    sources:
      - "lib/src/builder/**/*.dart"
      - "lib/builder.dart"
    dependencies:
      - "build"
      - "source_gen"
builders:
  # The actual builder config.
  my_builder:
    target: ":_my_builder"
    import: "package:my_package/builder.dart"
    builder_factories: ["myBuilder"]
    build_extensions: {".dart": [".my_package.dart"]}
Changelog

0.1.0

  • Initial release - pulled from package:dazel. Updated to support build_extensions instead of input_extension and output_extensions.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add build_config
pubspec.yaml
name: build_config
version: 0.1.0
description: Support for parsing `build.yaml` configuration.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/build

environment:
  sdk: '>=1.22.1 <2.0.0'

dependencies:
  path: ^1.4.0
  yaml: ^2.1.11

dev_dependencies:
  test: ^0.12.24

Version history

VersionPublishedArchiveSHA-256
0.1.02017-11-14T18:58:09.511518ZDownload651a0eb08d5a771f25a1e243853ab1ec2886baf5c5a91bcc4a6871f9a1c6d5ed
0.1.12017-11-30T23:23:05.178608ZDownload121501c814791e16613c33176da53469b572aeee8b78543e2164edd7bcc2ae8b
0.2.02017-12-21T18:51:52.124230ZDownloade9823b53a7481fea3cc5754f24944fd6ef6a8031497a87f449da538b25c24d73
0.2.12017-12-22T20:58:22.543423ZDownload01efb18e7bbb9687300cb35410d41946481c32a854d033adf6694075b4d0a4b9
0.2.22018-01-18T21:34:57.741980ZDownload79ce134a494d5339bd99c5e2f77f132fc51db42075c31bbfe870d56183232946
0.2.2+12018-01-18T22:13:55.627586ZDownloadb18a9d27c9b5784a74de48d11babbc2db79638aff94293eca7f1ef953d79314c
0.2.32018-02-01T17:40:46.059803ZDownload4ac0a022b67888b9d1292510a1f4385e69c500166bfae8d2965bd971fbb6255c
0.2.42018-03-01T20:44:29.955418ZDownload66c8c49bfc2561d5e07f31a010bc65bc5698e41dc7307e8b49d22a4b4cf127d6
0.2.52018-03-13T01:26:39.203867ZDownloadf5b99c182e8a2fe51d2bfe7376b52978f95f04f1f0a65e0a9f4cc77bcfd98714
0.2.62018-04-06T22:45:18.461363ZDownload1dc68dd68312a03a2c0ea644275a0223872fc21515eba7c6b92b40eb0a42dde1
0.2.6+12018-04-06T23:36:58.745934ZDownload6794050f1d3dead34491d9eaa818171adecbb8e7a98076bc63ccebe404e34822
0.2.6+22018-05-16T20:32:05.406801ZDownload4c1a0a3914f5c8a223c2b9ce67feeef3cc5c9e690ff9141473a87ef45fa808ae
0.3.02018-06-05T15:22:00.494145ZDownload1dc91de2c16188d4c351cfac66ce67574831ed3c40a80864ce7f8ba1ca55bbe0
0.3.12018-06-22T19:36:57.232979ZDownload9da2ccef16566de864e3a1fea4adc274d726105d32e34a749a318d21704f558a
0.3.1+12018-07-16T21:29:17.312833ZDownload4ff4bbacbd27e84d22664750dce25f68c49df7c52b649f4313a0ba6ba1576084
0.3.1+22018-07-24T23:39:29.800484ZDownloadb9627573d3fc4a00bf02f54c4f69be307c95c75b4fe49105eb0600cb328273bb
0.3.1+32018-09-25T21:25:41.145120ZDownloadef70cfa1e0de6bfc67e3351245a898cb831ea0b262f475399d7f9bef78fba58e
0.3.1+42018-10-23T21:39:40.060660ZDownload6d4bfa079ef937b9b847b705237637b62c21d48599c28fc69f4e466524122f6f
0.3.22019-04-10T20:40:32.436709ZDownload298307053d426e1881846ddf2d2f5c98f9d9fe98e8c68bdaaebf828602e46062
0.4.02019-04-23T19:49:59.071696ZDownload9f3d3b1d6733faf8e27560703736e39834df0bef9224a06a7cf7a96b6e46f92c
0.4.12019-07-03T18:25:04.286584ZDownloadc29913e2bc13b286ffa488447d559a41556cd56a6c006623a22e59049a94a4c1
0.4.1+12019-08-08T16:22:05.288300ZDownload48706f0f42ce64df2f980d50404184463e019c36b0dcd09e68bfb7546c789ee4
0.4.22020-02-05T17:40:08.984587ZDownloaded3082b3c5512ba6bbffe1f6b1ba165316607b7e6322a8cc37ee60964b8f2e06
0.4.32020-11-18T16:54:20.298276ZDownload20acd988503d0499ada4a85208a970c7ece0c7e56cd5ff1028052d396148290a
0.4.42020-12-02T20:41:42.169228ZDownload418225797ea30b93c0301d8911446c0be4e3c6e3b0e721225050fe5ba92c4175
0.4.52020-12-08T22:25:46.657475ZDownload9e5aa739e28154fc8b5c483ab54ad861759529ec455f8636106166ad0e5ab1b8
0.4.62021-02-17T15:02:46.840875ZDownloadedd0f55c5af49a408311330cc84b213acc7491a85d6f2f890e503ffe00290176
0.4.72021-03-12T21:33:19.749211ZDownload9160104f468c8117f7dddd3c94d8f440d0f82a324bf29eb84e0b434cff7a0e03
1.0.02021-04-20T19:39:23.457714ZDownloadad77deb6e9c143a3f550fbb4c5c1e0c6aadabe24274898d06b9526c61b9cf4fb
1.1.02022-07-12T17:24:47.930736ZDownload5b7355c14258f5e7df24bad1566f7b991de3e54aeacfb94e1a65e5233d9739c1
1.1.12022-10-18T16:51:38.635204ZDownloadbf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
1.1.22024-12-16T21:47:45.621647ZDownload4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33
1.2.02025-08-15T11:33:38.317684ZDownload4f64382b97504dc2fcdf487d5aae33418e08b4703fc21249e4db6d804a4d0187
1.3.02026-02-25T20:01:16.505138ZDownload4070d2a59f8eec34c97c86ceb44403834899075f66e8a9d59706f8e7834f6f71
1.3.12026-07-08T10:23:30.894436ZDownloadf2c223156a26eea323e6244b85141d76413a80aeee9fe0b380773789fabaf8ae
1.3.22026-07-27T10:57:26.508684ZDownload94eaf6708fe64408c632ef2689ca3777b112f9421306ccf4f8c84d7c5c9f83f8
1.3.32026-09-02T12:25:57.100188ZDownloadd466ed2dc9c6cd1d169948879b84ee061eb5e22c64a7c6089879c6296d272a8d
1.4.02026-10-14T09:37:40.524794ZDownload4703a785fbc3c266c5c7518589d0863f6a05078ee33f7ca5aa4b87a56f1cedd2

Dependencies

path "^1.4.0"

yaml "^2.1.11"