Skip to content

Conversation

@kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented Dec 15, 2017

No description provided.

@kevmoo kevmoo force-pushed the more_readme_fun branch 3 times, most recently from ed66ebb to 0ab4316 Compare December 15, 2017 05:37
@kevmoo
Copy link
Collaborator Author

kevmoo commented Dec 15, 2017

FYI @sethladd – here's the rendered readme: https://github.com/dart-lang/json_serializable/tree/more_readme_fun/example/

Thoughts?

source files.

```console
> dart bin/build.dart
Copy link
Collaborator Author

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?

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.

Copy link
Collaborator Author

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.

@kevmoo kevmoo changed the title Fix cross-links to sub-packages: link to the directory, not the README Many updates to example/ Dec 15, 2017
void _expect(String fileName) {
test(fileName, () {
final file = new File(fileName);
expect(file.readAsStringSync(), contains(_pubspecContent));
Copy link
Member

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?

Copy link
Collaborator Author

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.

[INFO] Build: Succeeded after 68ms with 0 outputs
```

Assuming you follow the layout of the [`tool`][tool] directory, run
Copy link
Collaborator

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 :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

@kevmoo
Copy link
Collaborator Author

kevmoo commented Dec 15, 2017

Everyone: PTAL

...and ensure pubspec/readme consistency with a test
[INFO] Build: Succeeded after 68ms with 0 outputs
```

*NOTE*: If you're using Flutter, running a Dart script is a bit tricky. You can
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sethladd @mit-mit – here's the best I could come up with.

Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants