Titanium JIRA Archive
Alloy (ALOY)

[ALOY-158] Templates for "alloy new"

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusResolved
ResolutionFixed
Resolution Date2012-10-01T20:37:52.000+0000
Affected Version/sn/a
Fix Version/s2012 Sprint 20, Release 3.0.0
ComponentsTitanium SDK, XML
Labelsnotable
ReporterTony Lukasavage
AssigneeUnknown
Created2012-08-02T09:16:35.000+0000
Updated2018-03-07T22:25:48.000+0000

Description

Comments

  1. Russell McMahon 2012-08-28

    We will do this for samples and sample will have a manifest like widgets.
  2. Tony Lukasavage 2012-08-29

    That's seems like an entirely separate issue, but maybe i am misunderstanding. Are samples meant to be template? This ticket refers to the creation of usable controller templates.
  3. Russell McMahon 2012-08-29

    Yup your right the controller template is a separate issue. Could you give a quick example of a controller template, and use case?
  4. Tony Lukasavage 2012-08-29

    Let's say you wanted a "tabgroup" template that mimicked Titanium's default 2 tabbed app. Your controller could be generated something like this:

    index.xml

       <Alloy>
           <TabGroup>
               <Tab title="Tab 1">
                   <Window title="Tab 1">
                       <Label>Tab 1</Label>
                   <Window>
               </Tab>
               <Tab title="Tab 2">
                   <Window title="Tab 2">
                       <Label>Tab 2</Label>
                   <Window>
               </Tab>
           </TabGroup>
       </Alloy>
       

    index.js

       $.index.open();
       
  5. Tony Lukasavage 2012-09-17

    The alloy new command can now generate new projects based on a template name. The current list of template names can be found here: https://github.com/appcelerator/alloy/tree/master/templates Right now they are "default" and "two_tabbed". An alloy project utilizing the "two_tabbed" template would be created like this:
       alloy new . two_tabbed
       
  6. Tony Lukasavage 2012-10-01

    Michael Xia has requested that we add images and descriptions to each template that can be read by tistudio. I am awaiting details on those.
  7. Tony Lukasavage 2012-10-01

    Added new images and description README files to the 2 alloy templates

JSON Source