Skip to content

Commit 2751044

Browse files
nateboschmatanlurey
authored andcommitted
Some READEME cleanup (#241)
- Drop references to deleted `tool/` directory. - Elaborate on how `source_gen` fits into `build`.
1 parent 21bb6b7 commit 2751044

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ Once you have `source_gen` setup, you should reference the examples below.
5454

5555
## Creating a generator
5656

57-
Extend the `Generator` class to plug into `source_gen`.
57+
Extend the `Generator` or `GeneratorForAnnotation` class and `source_gen` will
58+
call your generator for a Dart library or for each element within a library
59+
tagged with the annotation you are interested in.
5860

5961
* [Trivial example][]
60-
* [Included generators][]
6162

6263
## Running generators
6364

64-
`source_gen` is based on the [`build`][build] package.
65-
66-
See `build.dart` and `watch.dart` in the `tool` directory. Both reference
67-
`tool/phases.dart`, which contains information mapping `source_gen` generators
68-
to target files.
65+
`source_gen` is based on the [`build`][build] package. Use a `PartBuilder` or
66+
`LibraryBuilder` to wrap your `Generator` as a `Builder` which can be run using
67+
a build system compatible with `package:build`. See the build package
68+
documentation for information on running Builders.
6969

7070
## FAQ
7171

@@ -122,7 +122,6 @@ detail*.
122122

123123
[Dart transformers]: https://www.dartlang.org/tools/pub/assets-and-transformers.html
124124
[Trivial example]: https://github.com/dart-lang/source_gen/blob/master/test/src/comment_generator.dart
125-
[Included generators]: https://github.com/dart-lang/source_gen/tree/master/lib/generators
126125
[build.dart]: https://github.com/dart-lang/source_gen/blob/master/build.dart
127126
[generate]: http://www.dartdocs.org/documentation/source_gen/latest/index.html#source_gen/source_gen@id_generate
128127
[build]: http://www.dartdocs.org/documentation/source_gen/latest/index.html#source_gen/source_gen@id_build

0 commit comments

Comments
 (0)