Outputs the contents of the static, craft2, and craft3 generators in a new directory matching the projectName unless the directory the generator is run in matches the projectName.
It could be argued that the other generators should also follow this logic for consistency, but since the other generators are much more likely to only be run on their own inside of existing projects, I think its fair to start here.
The one piece not implemented here that should probably be handled separately is the ability to pass in the projectName via a command line argument when running the generator, e.g. yo one-base:craft3 my-craft-project.
Getting this argument working was fairly easy, using the value of the argument as a default value for the projectName prompt was not as obvious.
Outputs the contents of the
static
,craft2
, andcraft3
generators in a new directory matching theprojectName
unless the directory the generator is run in matches theprojectName
.It could be argued that the other generators should also follow this logic for consistency, but since the other generators are much more likely to only be run on their own inside of existing projects, I think its fair to start here.
The one piece not implemented here that should probably be handled separately is the ability to pass in the
projectName
via a command line argument when running the generator, e.g.yo one-base:craft3 my-craft-project
.Getting this argument working was fairly easy, using the value of the argument as a default value for the
projectName
prompt was not as obvious.