OmniSharp / generator-aspnet

yo generator for ASP.NET Core
877 stars 168 forks source link

adding complex arguments to a subgenerator #92

Closed erichexter closed 8 years ago

erichexter commented 9 years ago

Have you considered a way to add a complex type as an argument to a subgenorator.

Scenario would go like this:

I create a viewmodel, then I generate a controller and view for it.

yo aspnet:mvcview foomodel
or yo aspnet:mvcview {foomodel:{Title:"",Count:"",.... }}

Then the argument can be used inside of the view generation template.

peterblazejewicz commented 9 years ago

I think options complicates usage - the Yeoman has builtin solution for asking for options when one types subgenerator name she could be asked about model generation (similary: should Sass or Less be used, should Boostrap or Foundation be included, shuld Gulp or Gruntfile build system be used, etc): http://yeoman.io/authoring/user-interactions.html

spboyer commented 9 years ago

I would agree with @peterblazejewicz, there is even a case where options like --gulp are hard to discover and when either misspelled or a single dash -gulp is used the option is simply ignored.

peterblazejewicz commented 8 years ago

The current version (not yet published to NPM) supports:

yo aspnet [projecttype [applicationname] [uiframework]]

See project README.md. there are options like --grunt, --coreclr documented with subgenerators/generator.

Closing this, thanks!