Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1632] Alloy: Allow to import a custom template from dir using Alloy CLI

GitHub Issuen/a
TypeNew Feature
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-06-21T17:31:21.000+0000
Affected Version/sn/a
Fix Version/sCLI Release 7.1.0, Alloy 1.14.0
Componentsn/a
Labelsalloy-cli
ReporterJorge Macias Garcia
AssigneeFeon Sua Xin Miao
Created2018-09-27T08:05:09.000+0000
Updated2019-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?

Comments

  1. Rodrigo Farfán 2018-09-27

    Really interesting. 1 vote up from me
  2. Lokesh Choudhary 2019-06-21

    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.

JSON Source