Allow to use any template by giving its path#78
Allow to use any template by giving its path#78T1mL3arn wants to merge 2 commits intoHaxeFlixel:devfrom
Conversation
Geokureli
left a comment
There was a problem hiding this comment.
I don't agree with using the templateName arg to specify the source path, and i think the doc is confusing and makes it confusing to differentiate the source path with the destination path.
could we instead leave the name as the name, and add a new arg like --sourcePath of something?
| final isHaxelibRun = Sys.getEnv('HAXELIB_RUN') != null; | ||
| return new massive.sys.cmd.Console(isHaxelibRun); | ||
| } | ||
|
|
There was a problem hiding this comment.
This properly determines if tools are run by haxelib. During tests of this patch I run the tools directly by neko run.n, and without HAXELIB_RUN var check there is a bug when last . argument passed to the tools is ignored. See massive-oss/mlib/pull/25
| if (!autoContinue) | ||
| { | ||
| answer = CommandUtils.askYN("Directory exists - do you want to delete it first?"); | ||
| answer = CommandUtils.askYN("Directory exists - do you want to delete it first? Type . to abort."); |
There was a problem hiding this comment.
Maybe add CommandUtils.askYNAbort to be more clear?
T1mL3arn
left a comment
There was a problem hiding this comment.
Trying to make command help less confusing
Why not? Using the same arg as a source for the template (path or name) looks natural to me. E.g. in git we can use |
how is it natural to use an arg for a purpose completely unrelated to it's name, why not just use a new arg |
So, we are talking about naming here. It could be named like git checkout <branch>
git checkout <commit>Why can't we do flixel tpl <template-name>
flixel tpl <template-path>
# or more general
flixel tpl <template-source>? Also, maybe in the first place, there is no need in template-name ? ATM Flixel has only default template and no means to create other (convenient at least). |
closes #77
Now it is possible to do this:
flixel tpl ../platformer-template . -n "Marevo"which creates in
.(current dir) a project with name "Marevo" from template found in../platformer-template.