Uploaded image for project: 'Appcelerator Studio'
  1. Appcelerator Studio
  2. TISTUD-2871

Allow pluggable inferencing/lookup of require calls

    Details

    • Story Points:
      13

      Description

      Titanium SDK's usage of require is slightly different than what NodeJS/CommonJS uses as it has an implicit base path of <project>/Resources

      An example:

      var r = require('http');
      

      In Node, we'd load the core 'http' module. In Titanium we'd look for <project>/Resources/http.js. Additionally, Titanium merges the platform-specific subfolders of Resources. So...

      var taskWindow = require('ui/TaskWindow');
      

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                cwilliams Christopher Williams
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: