[ALOY-1238] Can't re-create index controller after renaming original one
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-02-18T14:46:56.000+0000 |
Affected Version/s | Alloy 1.5.1 |
Fix Version/s | Alloy 1.7.0 |
Components | Tooling |
Labels | n/a |
Reporter | Tim Statler |
Assignee | Feon Sua Xin Miao |
Created | 2015-02-10T17:31:57.000+0000 |
Updated | 2015-09-07T13:31:24.000+0000 |
Description
Scenario
I want to refactor an existing Alloy app by moving/re-naming the current index.xml/js/tss controller triad to something else, and then create a new index controller.Steps:
1. Create a new Alloy app. 2. Rename views/index.xml, styles/index.tss, and controllers/index.js to views/main.xml, styles/main.tss, and controllers/main.js. 3. Create a new "index" controller:
$ alloy generate controller index
Results:
Actual:
[ERROR] Alloy "app" directory has no "controllers/index.js" file at "/Users/tstatler/alloy_test_apps/testing/boo/app/controllers/index.js".
Expected: I can create a new index controller w/o error.
Comments
- Feon Sua Xin Miao 2015-02-18 PR: https://github.com/appcelerator/alloy/pull/666 To test, follow steps above, new index files should be created with no error.
- Tim Poulsen 2015-02-18
FR/CR pass, merged
Tip to QE, you can rename the index controller for testing with
alloy move index foo
Then,alloy generate controller index
should work, as shouldalloy generate style bar
andalloy generate view baz
- Ewan Harris 2015-09-07
Verified using:
Windows 8.1
Appc NPM 4.2.0-1
Appc CLI Core 5.0.0-41 (Alloy 1.7.X)
After renaming the original index controller a new one can be generated using
alloy generate controller index
orappc alloy generate controller index
Closing ticket