[ALOY-158] Templates for "alloy new"
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2012-10-01T20:37:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2012 Sprint 20, Release 3.0.0 |
Components | Titanium SDK, XML |
Labels | notable |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2012-08-02T09:16:35.000+0000 |
Updated | 2018-03-07T22:25:48.000+0000 |
Description
Comments
- Russell McMahon 2012-08-28 We will do this for samples and sample will have a manifest like widgets.
- 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.
- 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?
- 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();
- 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
- 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.
- Tony Lukasavage 2012-10-01 Added new images and description README files to the 2 alloy templates