I’ve tried searching for this, but not finding any relevant ansers, so my apologies if this has been asked already.
When using “lime create project [FOLDER]”, is there a way for me to provide a custom project template? I’d like to have a .vscode directory added as well, and some default stuff added to the project.xml file for some common code I have in my projects. If there isn’t a way, I suppose I can just create an empty project, and clone it into new directories as needed, but thought a template that filled in names and such would be better.
As you invoke the lime create project [FOLDER]
command, among some other things lime copies the files from lime’s templates\project subfolder to [FOLDER].
So you could simply make a duplicate of the project folder, name it e.g. project2 and create a new subfolder .vscode. Of course you can also modify the project.xml file according your needs.
Now you just need to invoke create using the new template project2 like lime create project2 [FOLDER]
Lime has currently two paths for bootstrapping a project
One is the “samples” path. You can use <samples path="to/your/samples" /> in your ~/.lime/include.xml file, then you will be able to lime create NameOfSample optional/output/path to generate a copy.
Or you can use the “project” path. You can use <templates path="to/your/custom/templates" /> to a directory that contains a “project” folder. This should override the Lime default project type. This is designed to work specifically where haxelibs can override the default project. I believe the syntax may be lime create starling:project ProjectName or lime create openfl:project ProjectName. This is one of the few differences between running the openfl command vs. the lime command in that the default prefix for the project template is the OpenFL template rather than the Lime one
Thanks! I was hoping something could be done with the ~/.lime/ folder. I was looking at the code for the command line utility, but got distracted and had to get back to other things. I will try out what you suggested.