[TIMOB-16008] Tooling: Per-project installs of NPM modules
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2016-09-02T06:17:07.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Tooling |
Labels | n/a |
Reporter | Ingo Muschenetz |
Assignee | Chris Barber |
Created | 2013-12-17T17:42:08.000+0000 |
Updated | 2017-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.
This will definitely involve corresponding and additional tickets in both ALOY and TISTUD as well.
Interesting idea, but will it blend?
Indubitably: http://www.youtube.com/watch?v=4nsNqbaAFuE
Everything about this is a bad idea.
Closing ticket as the issue will not fix and with reference to the above comments.