Skip to content

Creating a stand-alone example #80

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 5 commits into from
Dec 14, 2017
Merged

Creating a stand-alone example #80

merged 5 commits into from
Dec 14, 2017

Conversation

kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented Dec 13, 2017

No description provided.

Should make it easier to get started
@kevmoo kevmoo changed the title WIP: Creating a stand-alone example Creating a stand-alone example Dec 14, 2017
@kevmoo kevmoo requested a review from natebosch December 14, 2017 00:30
@kevmoo
Copy link
Collaborator Author

kevmoo commented Dec 14, 2017

CC @sethladd

Provides `source_gen` `Generator`s which generate code to
make it simple to serialize to and from JSON.
Provides [source_gen] `Generator`s to create code for JSON serialization and
deserialization.

Choose a reason for hiding this comment

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

Can we clearly state something like "To use this package, you need to install source_gen, by going 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.

There's no install, per se. You just put the right things in your pubspec.

I will make sure to mention that.

@@ -15,5 +15,12 @@ The annotation package which has no dependencies.

Import it into your pubspec `dependencies:` section.

## [example]

A simple example showing how to setup and use [json_serializable] and

Choose a reason for hiding this comment

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

I'm confused, where is the example?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See https://github.com/dart-lang/json_serializable/tree/example (although the link is broken because this isn't on master yet)

@kevmoo kevmoo requested a review from jakemac53 December 14, 2017 04:34
* `tool/`: Contains the code run during development to create and update
generated code.

* `build_actions.dart`: A convention when using `package:build` to
Copy link
Collaborator

Choose a reason for hiding this comment

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

We actually should change this convention - having separate scripts means they have separate asset graphs which isn't what you want.

Instead you could add a flag to change whether it calls build/watch?

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 add args parsing, etc to the example.

I'd rather have dart-lang/build#718

@@ -0,0 +1,27 @@
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
Copy link
Collaborator

Choose a reason for hiding this comment

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

2017

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done!

Copy link
Collaborator

@jakemac53 jakemac53 left a comment

Choose a reason for hiding this comment

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

I don't like having an example which isn't putting forward best practices - but we can improve it once we have dart-lang/build#718.

@kevmoo
Copy link
Collaborator Author

kevmoo commented Dec 14, 2017

I don't like having an example which isn't putting forward best practices - but we can improve it once we have dart-lang/build#718.

Let's make best practices easier first! 😄

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.

3 participants