p-hatan/ mirror

pub repository

mirror.p-hatan.com

build_barback

0.1.1

Utilities for translating between builders and transformers.

Download archive

Readme

Build Status Coverage Status

build_barback

Allows wrapping up a Builder as a Transformer so that it can be run in pub or vice-versa.

Using a Builder from Pub

Wrap the Builder instance with new BuilderTransformer(builder) and use it like any other Transformer. The Builder used this way must follow the rules of other Transformers, it cannot use inputs from outside the package where the Transformer is specified in pubspec.yaml

Using an exisiting Transformer with package:build

Wrap the Transformer instance with new TransformerBuilder(transformer) and run as any other Builder. The Transformer instance used this way must follow the rules of other Builders:

  • It cannot overwrite files it uses as inputs.
  • It must know before building what the outputs will be (it must be a DeclaringTransformer).

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.1.1

  • Support the global log from build

0.1.0

Updated to reflect the new support for reading/writing as bytes in the build package, and the removal of the Asset class.

New Features

  • BuilderTransformer now supports wrapping transformers that read or write their inputs as bytes.
  • The Resolver implementation now has isLibrary to check whether an Asset is a Library and throws an exception rather than returns null on getLibrary when it isn't

Breaking Changes

  • Stopped exporting lib/src/util/barback.dart which contains internal only utilities. Specifically, the following items are no longer public (some are deleted entirely or had breaking changes as well):
    • toBarbackAsset
    • toBarbackAssetId
    • toBarbackTransform
    • toBuildAsset
    • toBuildAssetId
    • toTransformLogger
    • BuildStepTransform

0.0.3

  • Prevent asset writing from escaping beyond the complete() call in BuildStepImpl

0.0.2

  • Fix a bug forwarding logs from a BuilderTransformer

0.0.1

  • Initial separate release - split off from build package.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add build_barback
pubspec.yaml
name: build_barback
version: 0.1.1
description: Utilities for translating between builders and transformers.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/build

environment:
  sdk: '>=1.9.1 <2.0.0'

dependencies:
  analyzer: ">=0.27.1 <0.30.0"
  barback: ^0.15.0
  build: ^0.7.0
  code_transformers: ">=0.5.1 <0.6.0"
  logging: ^0.11.2

dev_dependencies:
  build_test: ^0.4.0
  test: ^0.12.0
  transformer_test: ^0.2.0

Version history

VersionPublishedArchiveSHA-256
0.0.12016-11-28T23:56:18.031ZDownloaddfb8cfdb3dc63abfcba9613c9f1d18a31e7722ec6a7267468713c93d28f407c3
0.0.22016-12-02T20:32:35.851ZDownload646d02f140633293881adefd0a30330109f5cced190828a839faa12f2d3fef1c
0.0.32016-12-09T17:54:17.623ZDownload6b532f2f34a230604c7a772caca258d4e03d0fbe9861a4e0596ea01f633c3bd0
0.1.02017-01-27T21:27:00.569ZDownloaddceb9fa012d298f0602167870fdfb772744bc0ca658af6b3ada599c2e96ebec2
0.1.12017-02-11T00:36:27.066ZDownload1c9fd2c3c1ec7b084a049f2e379ff65102bfd45901d5415a90a4368aeeb2a687
0.1.22017-04-13T21:59:03.231310ZDownloadc7e47fecdfe4d5dd3d7f3d5648c7c66ba7a2b0f292efeb5a3a7397bd5d007b33
0.2.02017-04-25T18:03:29.380313ZDownload0726479cfb53ce11200a7b6bef4b49e29fca6e35b7b07299c58d524253964cb7
0.2.22017-05-04T20:55:03.963285ZDownload81f271249b376bb6e248c46659dec4ae9b2dca0d6a232fe8cc1e6ba6cbe45118
0.3.02017-07-18T05:05:57.271083ZDownload15c8f33e3afec1506d18b03c1d63b37edc7cb09379d43e2481c5b4d5f585c540
0.4.02017-08-14T17:47:29.683740ZDownload5317d9657574d7483a85182a0618acc1b72812b5a52e9ffd2bea1574c1dcf4e8
0.4.0+12017-09-21T22:03:18.435483ZDownloadb96fc39506a8b1ec17b6f2ce49e32af29bd6cc5c34f27fadf1aacd4f2a502958
0.4.0+22017-11-02T21:15:17.932900ZDownload88ffd1473d81deb7217b9fa224b5c4932ec907c4c6e6d6e67e8dbfffe91baea4
0.5.02017-12-07T22:11:40.799897ZDownload46657a87cd813aa0c719b684bf42b1967de2a336b2793097802a470f932e6210
0.5.0+12018-01-02T17:03:42.932315ZDownload19f8dbe05306df69539ea2125f5c9cd669345666766ac3d59b4a87bf781eab9d
0.5.0+22018-01-18T22:14:12.922248ZDownload11a779f3903a7cdc1f03c3020b4ee7e740c6faede750e39e890319a7f3391b3b
0.5.0+32018-02-03T00:27:00.495611ZDownload8704f76228bcd25a3bbb6f206ef5c45fb917162b0e3ae25e256b0257a2b29c6d
0.5.0+42018-05-14T23:57:54.621368ZDownloadc74c9ec33b6fa26671195d0afcef02a1d9262d52ddc9ed10b19c1ad6d2d8bffd

Dependencies

analyzer "\u003e=0.27.1 \u003c0.30.0"

barback "^0.15.0"

build "^0.7.0"

code_transformers "\u003e=0.5.1 \u003c0.6.0"

logging "^0.11.2"