Skip to content

Commit

Permalink
example: cleanup readme and pubspec (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Jan 19, 2023
1 parent 832fc7b commit bccf4b3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
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
''';

0 comments on commit bccf4b3

Please sign in to comment.