DEV Community

Discussion on: Raising the Limits on Developer Speed

Collapse
 
hallamoore profile image
Halla Moore

So command is perhaps a bit misleading, but it's referring to the first argument to the scaffold script. The pattern is yarn run scaffold {command} {names}. The command argument has to be one of the cases defined in the switch statement on line 257 (gist.github.com/hallamoore/bf4e18e...), which are 'store', 'component', 'layout', 'screen', 'container', and 'model'. There's also a --stateful option which will use the stateful template, so you might want yarn run scaffold component statefulComponentTemplate --stateful. Hope this helps!

Collapse
 
hallamoore profile image
Halla Moore

Also, just to clarify, you can use any custom name rather than matching the name of the template. It's the command argument and --stateful option that determines which template will be used. E.g. yarn run scaffold component MyStatefulComponent --stateful will create a component named MyStatefulComponent with the statefulComponentTemplate, while yarn run scaffold model User will create User with the modelTemplate