Create custom project template in HaxeDevelop

On the HaxeDevelop website it is written under “Project Management” that …

You can create, customize and share your own project templates.

But how? I have some boilerplate code for 2D game production and it would be nice to just create a new project like “OpenFL 2D Game” with my init functions already built in.

Would be nice to speed up prototyping games, but I did not find anything how to do it on the website.

When you say “template” you refer to parameterized templates, where you input some data at the moment you create it and the template gets customized with them? Because if that’s not needed, you can just git the boilerplate somewhere, clone a new copy whenever you need it and customize manually.

Another (perhaps overkill) option is to use something like Yeoman, which was made specifically for generating templates/boilerplates, it has a lot of niceties to help input the basic data in a more user-friendly way, among other things, but I never felt the need to use it, to be honest.

Can’t help you with HaxeDevelop though since I don’t use it, sorry.

Its a long time since i used them, but i remember writing similar for HaxeUI (version 1): haxeui/templates/flash-develop at master · ianharrigan/haxeui · GitHub - iirc, you just zip folders and file templates into a .zip with an .fdz extensions and drop it into a HD folder (which i cant remember now) and they should just appear…

thank you, guys.

You can check the HaxePunk project template:

The FDZ file then needs to be opened by FD/HD to be installed in the right location in your user local data.

What’s the advantage of these kind of templates over just created something on say, github and cloning it everytime you start a new project off it?

Im not really sure there is a huge difference to be honest… I suppose the main thing is that the template is parameterised, (see: haxeui/Main.hx.template at master · ianharrigan/haxeui · GitHub), ie, the “${PackagePath}” but there isnt really that many options that you could provide there:

I dont really use these types of templates anymore to be honest (i use a command line) - it could well be that there are other params for the templates i just dont know about - i guess also, for first time users its nice to have a something in a UI to use…

Edit: if FD/HD had the option to then start up a wizard of somekind after this dialog then i think they would start to get more useful again (for me at least)

I agree ultimately templates in the GUI are a bit old fashioned nowadays :slight_smile:

But hey kids, it comes from a time when GitHub or Npm did not even exist!

That said, where are the CLI Haxe projects generators?

@elsassph Mark made one once: GitHub - markknol/hxnew: Create new Haxe projects in a blast

Oh you’re right, I had forgotten it. I mean I did expect that there was something :smiley:

this is HaxeUI’s one: haxeui-core/cli at master · haxeui/haxeui-core · GitHub