Project: appceleratorstudio
Issue TISTUD-2871: Allow pluggable inferencing/lookup of require calls
Titanium SDK's usage of {{require}} is slightly different than what NodeJS/CommonJS uses as it has an implicit base path of {{/Resources}} An example: {code} var r = require('http'); {code} In Node, we'd load the core 'http' module. In Titanium we'd look for {{/Resources/http.js}}. Additionally, Titanium merges the platform-specific subfolders of Resources. So... {code} var taskWindow = require('ui/TaskWindow'); {code} Would look up {{Resources/iphone/ui/TaskWindow.js}} and {{Resources/android/ui/TaskWindow.js}} Additionally you can specify a native Titanium module id to load.
Story points: 13