HaxeFlixel / flixel-tools

Command Line tools for HaxeFlixel, create demos, templates and more.
50 stars 17 forks source link

Allow to use any template by giving its path #78

Open T1mL3arn opened 1 year ago

T1mL3arn commented 1 year ago

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.

T1mL3arn commented 11 months ago

I don't agree with using the templateName arg to specify the source path

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 checkout with commit hashes and branch names.

Geokureli commented 11 months ago

I don't agree with using the templateName arg to specify the source path

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 checkout with commit hashes and branch names.

how is it natural to use an arg for a purpose completely unrelated to it's name, why not just use a new arg

T1mL3arn commented 11 months ago

how is it natural to use an arg for a purpose completely unrelated to it's name

So, we are talking about naming here. It could be named like template-source then. Again, with git checkout it is not a problem, we can do

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).