Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16008] Tooling: Per-project installs of NPM modules

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2016-09-02T06:17:07.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTooling
Labelsn/a
ReporterIngo Muschenetz
AssigneeChris Barber
Created2013-12-17T17:42:08.000+0000
Updated2017-03-22T17:54:46.000+0000

Description

There is a desire to have per-project selection for Alloy version, and CLI version? Maybe inside Tiapp.xml? One logical solution to this is npm installs local to the project for titanium, Alloy, etc… For example:
cd PROJECT_DIR && npm install alloy
Would put alloy in the project’s local node_modules folder. Alloy could be invoked from that folder like this:
./node_modules/.bin/alloy
While this can be done manually, the idea long-term solution is for titanium projects to have a package.json file pre-propulated with these dependencies and versions so that all a developer or Studio needs to do is invoke npm install to automatically pull in all these dependencies locally. This would all come hand in hand with a more focused integration with npm in the Titanium toolchain. For Studio to be able to take advantage of this: * *Titanium CLI* – All of Studio’s call to “titanium” should first check for the existence of the “./node_modules/.bin/titanium” binary. It should use that for all titanium calls, and fallback to the globally installed one if no local version is present. * *Alloy* – Alloy’s CLI hook would need to be updated to do roughly the same thing. If Studio makes any calls directly to “alloy” (not sure if you do), they would have to do the same check as above.

Comments

  1. Tony Lukasavage 2013-12-17

    This will definitely involve corresponding and additional tickets in both ALOY and TISTUD as well.
  2. Chris Barber 2013-12-17

    Interesting idea, but will it blend?
  3. Tony Lukasavage 2013-12-17

    Indubitably: http://www.youtube.com/watch?v=4nsNqbaAFuE
  4. Chris Barber 2016-09-02

    Everything about this is a bad idea.
  5. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source