From 8e5e0f0377f72d56ae9f31f6467934603cbea95e Mon Sep 17 00:00:00 2001 From: thosakwe Date: Fri, 15 Sep 2017 15:30:44 -0400 Subject: [PATCH] Updated README --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 833e71c6..74f1ea5b 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ In your `pubspec.yaml`, you need to install the following dependencies: dependencies: angel_serialize: ^1.0.0-alpha dev_dependencies: - angel_serialize_builder: ^1.0.0-alpha - build_runner: ^0.3.0 + angel_serialize_generator: ^1.0.0-alpha + build_runner: ^0.5.0 ``` You'll want to create a Dart script, usually named `tool/phases.dart` that invokes @@ -28,11 +28,13 @@ the `JsonModelGenerator`. ```dart import 'package:build_runner/build_runner.dart'; import 'package:source_gen/source_gen.dart'; -import 'package:angel_serialize_builder/angel_serialize_builder.dart'; +import 'package:angel_serialize_generator/angel_serialize_generator.dart'; -final PhaseGroup PHASES = new PhaseGroup.singleAction( - new GeneratorBuilder([const JsonModelGenerator()]), - new InputSet('[YOUR_PACKAGE_NAME_HERE]', const ['lib/src/models/*.dart'])); +final List actions = [ + new BuildAction(new PartBuilder([const JsonModelGenerator()]), + '', + inputs: const ['test/models/*.dart']) +]; ``` And then, a `tool/build.dart` can build your serializers: @@ -40,7 +42,7 @@ And then, a `tool/build.dart` can build your serializers: import 'package:build_runner/build_runner.dart'; import 'phases.dart'; -main() => build(PHASES, deleteFilesByDefault: true); +main() => build(actions, deleteFilesByDefault: true); ``` If you want to watch for file changes and re-build when necessary, replace the `build` call