[ALOY-1632] Alloy: Allow to import a custom template from dir using Alloy CLI
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-06-21T17:31:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | CLI Release 7.1.0, Alloy 1.14.0 |
Components | n/a |
Labels | alloy-cli |
Reporter | Jorge Macias Garcia |
Assignee | Feon Sua Xin Miao |
Created | 2018-09-27T08:05:09.000+0000 |
Updated | 2019-06-21T17:31:22.000+0000 |
Description
Many of us use the open source version of Titanium / Alloy from the terminal to create our applications.
The process is always the same:
*ti create*
*alloy new*
Alloy allows you to transform a classic code application to mvc alloy and it is possible to set a template in the following way:
*alloy new ProjectNameFolder/ templateName*
The problem is: It only allows folder names that are hosted inside the templates folder in the alloy library.
If we move the custom template to this directory when alloy is updated, the custom template will be erased.
The proposal is:
Allow a directory path to be set as template.
*alloy new ProjectNameFolder/ /Path/to/my/custom/template*
This can be done in a simple way.
Just have to modify the *getPaths* function at line 136 in the file */alloy/Alloy/commands/new/index.js* and check if the *templateName* parameter is a directory or not.
What do you think about this proposal?
Really interesting. 1 vote up from me
Verified the fix with CLI Core 7.1.0-master.22. Custom template folder can now be used while converting a classic app to alloy app & works as expected. Closing.