Skip to content

Commit

Permalink
Merge pull request #15 from geert-janklaps/main
Browse files Browse the repository at this point in the history
Add new directory option + version update
  • Loading branch information
geert-janklaps authored Apr 7, 2021
2 parents e057fe3 + decd98b commit 8f34d9b
Show file tree
Hide file tree
Showing 3 changed files with 936 additions and 798 deletions.
9 changes: 9 additions & 0 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,21 @@ module.exports = class extends Generator {
name: "author",
message: "Who is the author of the library?",
default: this.user.git.name()
},
{
type: "confirm",
name: "newdir",
message: "Would you like to create a new directory for the library?",
default: true
}
];

return this.prompt(prompts).then(props => {
// To access props later use this.props.someAnswer;
// this.props = props;
if (props.newdir) {
this.destinationRoot(`${props.namespace}.${props.libraryname}`);
}

this.config.set(props);
this.config.set("namespaceURI", props.namespace.split(".").join("/"));
Expand Down
Loading

0 comments on commit 8f34d9b

Please sign in to comment.