meanjs / generator-meanjs

MEAN.JS Official Yeoman Generator
http://meanjs.org/
473 stars 178 forks source link

Composition Improvements #198

Closed surprisetalk closed 1 year ago

surprisetalk commented 8 years ago

Developers may want to compose the meanjs generator into their Yeoman projects.

Composing the meanjs generator automatically leads end-users through the configuration process. Using optionOrPrompt allows developers to preselect prompt values. Additionally, users can supply options on the command line. This may help "super-users" who to skip the interactive process.

Even with all the prompts preselected, the meanjs generator prints information that can interrupt its parents' compositions. A --quiet option was added to skip these logs.

If these improvements are well-received, I'll extend optionOrPrompt and --quiet to the sub-generators.

ilanbiala commented 8 years ago

@codydaig thoughts? It seems like a pretty good idea.

codydaig commented 8 years ago

I have not tested it, but I don't have any oppositions to it.

ilanbiala commented 8 years ago

@surprisetalk can you also add some tests for this?

surprisetalk commented 8 years ago

@ilanbiala Good idea, I'll probably have some time tomorrow.

codydaig commented 8 years ago

@surprisetalk What's the status of this PR?

UndeadBaneGitHub commented 8 years ago

@codydaig hm. This approach appeals to me, so if this one gets into master, I will can add the feature to the subgenerators. Writing tests for it will be a pain :)

surprisetalk commented 8 years ago

@codydaig Sorry, haven't had time to finish those tests. I've been swamped with work :disappointed: @UndeadBaneGitHub The tests are indeed a pain haha

surprisetalk commented 8 years ago

Alright! Sorry for the wait. Tests have been written. It went more smoothly than expected.

I'm aware that there are some egregious abuses of copy-and-paste. I didn't know how to work the with options tests into the code elegantly, so I'm looking for some direction on how you would like that done.

As a side note, I added my quiet option to all of the main app tests. Running npm test does not get interrupted with those pesky welcome messages anymore 💁🏼

ilanbiala commented 8 years ago

@surprisetalk can you fix the comments above?

surprisetalk commented 8 years ago

@ilanbiala Sorry, which comments need fixing?

surprisetalk commented 8 years ago

Okay, I cleaned up the stuff mentioned in your notes.

Sorry for the misunderstanding; I didn't notice that there were comments on my diffs.

ilanbiala commented 8 years ago

@codydaig LGTY?

codydaig commented 8 years ago

LGTM.

ilanbiala commented 8 years ago

Looks good, can you squash down to 1 commit and I'll merge? Also, could you add in some docs to the README.md about this?

ilanbiala commented 8 years ago

@surprisetalk can you squash down to 1 commit? Also, can you add some docs to the readme and I'll merge for the 0.4.5 version?