Intellij Idea Plugin for generating modules from templates
- open the folder ".template" in the root of the project
- add a new folder with "ModuleGenerator.json" file with properties
Important, Existing files will be overwritten with files from the template.
(example: /.templates/Demo/ModuleGenerator.json)
- add files and folders for your template to a new folder
(examples: /.tempalates/Demo/MyProject.txt , /.tempalates/Demo/MyFolder/MyFile.txt )
- right click on target folder
- click on "New"
- click on "Generate from TEMPLATE"
- select template
- set properties
- replace all necessary substrings with the property name specified in json and wrapped in double curly braces
- {{ .project_name }}
- {{ .project_name.uppercase() }} or {{ .project_name|upper }}
- {{ .project_name.lowercase() }} or {{ .project_name|lower }}
- {{ .app_package.replace('.', '/') }}
- {{ .app_package.replace("com.example", "com.mycompany") }}
{
"screen_name": "Register",
"feature_name": "Login",
"app_package": "com.example.app",
"screen_package": "{{.app_package}}.{{.feature_name|lower}}.ui.{{.screen_name|lower}}"
}You can see sample templates in the /.templates folder in the repository
* You should have your templates in the /.templates folder at the root of your project