Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Refactor common files into super class #20

Closed
sethladd opened this issue Aug 31, 2014 · 6 comments
Closed

Refactor common files into super class #20

sethladd opened this issue Aug 31, 2014 · 6 comments
Assignees
Milestone

Comments

@sethladd
Copy link
Contributor

Adding the same boilerplate files into each generator subclass isn't great. Example: I had to add LICENSE to both helloworld and webapp.

Shouldn't Generator take care of that?

@sethladd
Copy link
Contributor Author

cc @devoncarew for thoughts

@devoncarew
Copy link
Contributor

You can put the contents for files that are going to be identical across projects into src/common.dart, and then reference that content in the generator. We do that for the .gitiignore generated files.

@sethladd
Copy link
Contributor Author

The contents are in common.dart. It's this line:

_addFile('LICENSE', license);

that is duplicated.

See PR :)

@devoncarew
Copy link
Contributor

Ah, just saw the PR. Makes sense to me. Might be nice to have a subclass of Generator that was private to this library, that did add those more proscriptive things.

@sethladd
Copy link
Contributor Author

Nice, I'll give that a try.

@sethladd
Copy link
Contributor Author

Starting now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants