mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
docs(generator): improve and unify English documentation and examples for all DI source files
- Added comprehensive English documentation for all DI generator and support files: * inject_generator.dart — full class/method doc-comments, usage samples * module_generator.dart — doc-comments, feature explanation, complete example * src/annotation_validator.dart — class and detailed static method descriptions * src/type_parser.dart — doc, example for ParsedType and TypeParser, specific codegen notes * src/bind_spec.dart — interface, static factory, and codegen docs with DI scenarios * src/bind_parameters_spec.dart — details and samples for code generation logic * src/metadata_utils.dart — full doc and examples for annotation utilities * src/exceptions.dart — user- and contributor-friendly errors, structured output, category explanations * src/generated_class.dart — usage-centric doc-comments, example of resulting generated DI class - Removed Russian/duplicate comments for full clarity and maintainability - Ensured that new and existing contributors can easily extend and maintain DI code generation logic BREAKING CHANGE: All documentation now English-only; comments include usage examples for each principal structure or routine See #docs, #generator, #cherrypick
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
library;
|
||||
|
||||
//
|
||||
// Copyright 2021 Sergey Penkovsky (sergey.penkovsky@gmail.com)
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -12,6 +10,28 @@ library;
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
library;
|
||||
|
||||
/// CherryPick code generation library: entry point for build_runner DI codegen.
|
||||
///
|
||||
/// This library exports generators for CherryPick dependency injection:
|
||||
/// - [ModuleGenerator]: Generates DI module classes for all `@module()`-annotated classes.
|
||||
/// - [InjectGenerator]: Generates field-injection mixins for classes annotated with `@injectable()`.
|
||||
///
|
||||
/// These generators are hooked into [build_runner] and cherrypick_generator's builder configuration.
|
||||
/// Normally you do not import this directly; instead, add cherrypick_generator
|
||||
/// as a dev_dependency and run `dart run build_runner build`.
|
||||
///
|
||||
/// Example usage in `build.yaml` or your project's workflow:
|
||||
/// ```yaml
|
||||
/// targets:
|
||||
/// $default:
|
||||
/// builders:
|
||||
/// cherrypick_generator|cherrypick_generator:
|
||||
/// generate_for:
|
||||
/// - lib/**.dart
|
||||
/// ```
|
||||
///
|
||||
/// For annotation details, see `package:cherrypick_annotations`.
|
||||
export 'module_generator.dart';
|
||||
export 'inject_generator.dart';
|
||||
|
||||
Reference in New Issue
Block a user