[ALOY-676] Make constants.js valid for both nodejs and Titanium
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2013-05-30T00:04:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.2.0, 2013 Sprint 11 |
Components | Runtime |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2013-05-28T22:10:58.000+0000 |
Updated | 2018-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.
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.