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!
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
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
So
command
is perhaps a bit misleading, but it's referring to the first argument to the scaffold script. The pattern isyarn run scaffold {command} {names}
. Thecommand
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 wantyarn run scaffold component statefulComponentTemplate --stateful
. Hope this helps!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 namedMyStatefulComponent
with thestatefulComponentTemplate
, whileyarn run scaffold model User
will createUser
with themodelTemplate