-
Notifications
You must be signed in to change notification settings - Fork 444
Many updates to example/ #83
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
Conversation
a4ce500 to
d7bec76
Compare
ed66ebb to
0ab4316
Compare
|
FYI @sethladd – here's the rendered readme: https://github.com/dart-lang/json_serializable/tree/more_readme_fun/example/ Thoughts? |
0ab4316 to
18afcc0
Compare
| source files. | ||
|
|
||
| ```console | ||
| > dart bin/build.dart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sethladd – how does a flutter dev invoke a dart script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
today, it's a bit gnarly (@mit-mit is looking to improve this), but it's:
flutter packages pub run package:script
See flutter/flutter#13360 which asks to make this better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, this won't work. It's not in the bin directory, which is the only place pub run will run scripts.
| void _expect(String fileName) { | ||
| test(fileName, () { | ||
| final file = new File(fileName); | ||
| expect(file.readAsStringSync(), contains(_pubspecContent)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the value here? Making sure that versions are kept up to date? Should you read the pubspecs instead and use the versions from there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I have to read that file and figure out which lines I want. This seemed easier.
example/README.md
Outdated
| [INFO] Build: Succeeded after 68ms with 0 outputs | ||
| ``` | ||
|
|
||
| Assuming you follow the layout of the [`tool`][tool] directory, run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rest of the sentence appears to be missing here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
18afcc0 to
e02cf73
Compare
|
Everyone: PTAL |
...and ensure pubspec/readme consistency with a test
e02cf73 to
5a316dd
Compare
| [INFO] Build: Succeeded after 68ms with 0 outputs | ||
| ``` | ||
|
|
||
| *NOTE*: If you're using Flutter, running a Dart script is a bit tricky. You can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up bug: flutter/flutter#13607
No description provided.