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

Commit

Permalink
Merge pull request #309 from thso/master
Browse files Browse the repository at this point in the history
Consistently initialize default values for Generator.
  • Loading branch information
devoncarew committed Feb 16, 2016
2 parents 645db7f + 64220ba commit 1e1fd92
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/stagehand.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ abstract class Generator implements Comparable<Generator> {
Map vars = {
'projectName': projectName,
'description': description,
'year': new DateTime.now().year.toString()
'year': new DateTime.now().year.toString(),
'author': '<your name>'
};

if (additionalVars != null) {
Expand All @@ -113,10 +114,6 @@ abstract class Generator implements Comparable<Generator> {
});
}

if (!vars.containsKey('author')) {
vars['author'] = '<your name>';
}

return Future.forEach(files, (TemplateFile file) {
var resultFile = file.runSubstitution(vars);
String filePath = resultFile.path;
Expand Down

0 comments on commit 1e1fd92

Please sign in to comment.