Titanium JIRA Archive
Alloy (ALOY)

[ALOY-676] Make constants.js valid for both nodejs and Titanium

GitHub Issuen/a
TypeStory
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2013-05-30T00:04:09.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 11
ComponentsRuntime
Labelsn/a
ReporterTony Lukasavage
AssigneeUnknown
Created2013-05-28T22:10:58.000+0000
Updated2018-03-07T22:26:14.000+0000

Description

The constants.js file is located in the "Alloy/common" folder, which should be reserved for modules that work in both the nodejs and Titanium environment. In its current state, the module works only with nodejs. This module needs to be made to work with Titanium as well and distributed with the runtime modules so it can reliably be used by other modules at runtime. This should involve either wrapping specific sections in environment conditionals, or create a derived version of the constants.js file more tailored for runtime.

Comments

  1. Tony Lukasavage 2013-05-30

    PR: https://github.com/appcelerator/alloy/pull/138 Test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-676 The test app can be functionally verified simply by running it and seeing the JSON for the implicit namespaces printed on the screen, which is a JS object that maps UI element names to namespaces. Additionally, running jake test:all and ensuring that all automated unit tests pass will assert that existing usage of the constants.js has not been negatively affected.

JSON Source