[ALOY-342] Allow 'alloy generate' to create platform-specific files
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2012-12-07T23:15:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 0.3.4, 2012 Sprint 25 |
Components | Titanium SDK |
Labels | notable |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2012-10-24T19:20:08.000+0000 |
Updated | 2018-03-07T22:25:37.000+0000 |
Description
You should be able to create platform-specific views, styles, and controllers using the
alloy generate
command. Because platform-specific generators only make sense for views, controllers, and styles, only the alloy generate controller
and alloy generate view
commands will make use of the new *--platform* option for the CLI. If you attempt to use the *--platform* option with other generators, it will be ignored and a warning will be issued.
example 1
alloy generate controller myname --platform ios
The above would generate the following files:
* - app/views/ios/myname.xml
* - app/controllers/ios/myname.js
* - app/styles/ios/myname.tss
example 2
alloy generate view path/to/myname --platform android
The above would generate the following files
* - app/views/android/path/to/myname.xml
* - app/styles/android/path/to/myname.tss
No comments