Skip to content
This repository has been archived by the owner on Dec 17, 2022. It is now read-only.

create new addon from template #1

Open
sirinsidiator opened this issue Feb 18, 2019 · 0 comments
Open

create new addon from template #1

sirinsidiator opened this issue Feb 18, 2019 · 0 comments

Comments

@sirinsidiator
Copy link

In my local build environment I use an ant script to create new projects from templates. It asks if I want to create an addon or library, copies the files from the appropriate template folder, renames the manifest.txt to match the addon name and finally replaces the tokens in all files.

A better way would be to allow tokens in filenames too, instead of having any special files.

Kagrenac should follow the following procedure:

  1. Check a folder which is supposed to contain the templates. This folder comes with a few predefined templates (blank, addon, library), but the user can also add custom templates.
  • The blank template would just be a minimal example of what is needed to run code.
  • "Addon" could contain some utility functions and patterns that are often used (e.g. global namespace variable + multiple files, LAM settings panel, logging facilities)
  • "Library" would do the same, just for a project that should be considered a library.
  1. Show the user a list of all of them to choose from.
  2. Ask the user what the addon title, author name, api version, addon version etc should be.
  3. Copy the template to the target folder and replace tokens in all filenames and files.

The whole process could look like this:

>kagrenac create MyAddon
Please select a template:
1. Blank - A minimal addon with only the bare necessities
2. Addon - A template with everything addons regularly need
3. Library - A template specifically for libraries
4. MySuperDuperTemplate - Has all the secret sauce
>4
What should the addon be called? ("MyAddon")
>
Who is the author? ("sirinsidiator")
>
Which API versions should it support? (100026)
>100026 100027
What Version should it start with? (1.0.0)
>0.0.1
What AddOnVersion should it start with? (1)
> 100
Creating "MyAddon"... done
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant