Skip to content

example: cleanup readme and pubspec #1270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ dependencies to your `pubspec.yaml`.

```yaml
dependencies:
json_annotation: ^4.7.0
json_annotation: ^4.8.0

dev_dependencies:
build_runner: ^2.0.0
json_serializable: ^6.0.0
build_runner: ^2.3.3
json_serializable: ^6.6.0
```

Annotate your code with classes defined in
Expand All @@ -23,7 +23,7 @@ Annotate your code with classes defined in
Run `dart run build_runner build` to generate files into your source directory.

```console
> pub run build_runner build
> dart pub run build_runner build
[INFO] ensureBuildScript: Generating build script completed, took 368ms
[INFO] BuildDefinition: Reading cached asset graph completed, took 54ms
[INFO] BuildDefinition: Checking for updates since last build completed, took 663ms
Expand Down
11 changes: 8 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,29 @@ environment:
sdk: '>=2.18.0 <3.0.0'

dependencies:
json_annotation: ^4.7.0
json_annotation: ^4.8.0

dev_dependencies:
# Used by tests. Not required to use `json_serializable`.
_json_serial_shared_test:
path: ../shared_test
build_runner: ^2.0.0

# REQUIRED!
build_runner: ^2.3.3

# Used by tests. Not required to use `json_serializable`.
build_verify: ^3.0.0

json_serializable: ^6.0.0
# REQUIRED!
json_serializable: ^6.6.0

# Not required to use `json_serializable`.
lints: ^2.0.0
path: ^1.8.0
test: ^1.16.0

# This section is used to verify changes to these packages. Do not include in
# your code!
dependency_overrides:
json_annotation:
path: ../json_annotation
Expand Down
6 changes: 3 additions & 3 deletions example/test/readme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ void _expect(String fileName) {

const _pubspecContent = r'''
dependencies:
json_annotation: ^4.7.0
json_annotation: ^4.8.0

dev_dependencies:
build_runner: ^2.0.0
json_serializable: ^6.0.0
build_runner: ^2.3.3
json_serializable: ^6.6.0
''';