[ALOY-1509] Generate spec-compliant require calls
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2016-10-26T21:26:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Tooling |
Labels | n/a |
Reporter | Ben Bahrenburg |
Assignee | Bruce Wayne |
Created | 2016-07-25T13:23:07.000+0000 |
Updated | 2016-10-26T21:26:15.000+0000 |
Description
We now support proper require semantics for relative and absolute requires, and have deprecated the old "bare" requires that have typically been used in Titanium (that have been treated as absolute implicitly).
On Titanium 6+ Alloy should generate spec-compliant require values, i.e.
require('controllers/whatever'); // wrong!
require('/controllers/whatever'); // right, if that's the absolute path, may need to use relative
Given that these new correct versions would not work on Titanium 5 and lower, we should likely only generate these requires at build time for 6+.
Note that this isn't required for 6.0 - old style require calls will still work fine, but should probably be deprecated.
[~cng], are we keeping this for release 6.0.0?