-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to use any template by giving its path #78
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -79,7 +135,7 @@ class Template extends Command | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add CommandUtils.askYNAbort
to be more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.