Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1238] Can't re-create index controller after renaming original one

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-02-18T14:46:56.000+0000
Affected Version/sAlloy 1.5.1
Fix Version/sAlloy 1.7.0
ComponentsTooling
Labelsn/a
ReporterTim Statler
AssigneeFeon Sua Xin Miao
Created2015-02-10T17:31:57.000+0000
Updated2015-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

  1. 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.
  2. 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 should alloy generate style bar and alloy generate view baz
  3. 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 or appc alloy generate controller index Closing ticket

JSON Source