Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3240] Compile All Folders

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusClosed
ResolutionWon't Fix
Resolution Date2013-03-08T22:40:37.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Titanium SDK & CLI
Labelsalloy, build, compile
ReporterJoe Longstreet
AssigneeTony Lukasavage
Created2013-02-27T03:42:54.000+0000
Updated2016-03-08T07:57:39.000+0000

Description

When compiling/building an alloy project, it would be great if all folders within the app directory were automatically moved to the Resources directory. Currently only specified directories (controllers, models, etc) get moved. Moving all folders during the build would allow usage of normal commonjs patterns. Currently, the only way to use require is by placing exports within the assets directory, where it doesn't seem to fit. Example: app |--> controllers |--> index.js |--> models |--> views |--> utils |--> math.js In stuff: exports.add = function(a, b){ return a + b } in index: var math = require('math'); math.add(5, 3);

Comments

  1. Tony Lukasavage 2013-03-08

    We plan to stick to the convention of having both the "app/assets" and "app/lib" folders move their contents into the Resources folder during the compile process. The "app/lib" folder is a more appropriate place for your commonjs files. http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Concepts-section-34636240_AlloyConcepts-ConventionoverConfiguration
  2. Joe Longstreet 2013-03-10

    Wow, totally missed that in the docs. Thanks for the clarification.

JSON Source