Project: titanium
Issue TIMOB-16078: Implement full NodeJS require specs so we can use NPM for modules
I know from [~jhaynie] that Hyperloop (and thus Ti.Next - likely Titanium 4.x) will support the full [NodeJS require specs|http://nodejs.org/api/modules.html] so to make it possible to use NPM as a package manager for all kinds of modules. This is also the direction ALOY-86 has been going, asking for widget dependency management. I open this ticket to request looking into the possibility of implementing this in Titanium 3.x already. * What are the obstacles to change the require implementation to require both JS and native modules from the local and global {{node_modules}} paths? * What does it take to get Alloy to loading e.g. widgets from local and global installed {{node_modules}}? * How should the builder copy in global {{node_modules}} to the project when it packages the app? I think this would spur and new wave of Titanium native/CommonJS modules and Alloy widgets, sync adapters etc that would really boost the platform, as well as making it easier to re-use proprietary components in multiple projects myself. Ultimately, I think {{tiapp.xml}} and {{manifest}} could even be replaced by {{package.json}}?
Story points: 8