0
votes

I want to use the following library with my Titanium/ Alloy project:

https://github.com/sindresorhus/query-string

It can be installed using nodeJS.

However, Alloy typically only allows files coming from the lib folder.

According to: https://archive.appcelerator.com/question/154529/how-to-use-nodejs-modules-with-titanium#answer-285207

they used a copy and paste method, but this won't be suitable as this specific has dependencies.

How can I do this?

1
If the dependencies are core modules you cannot, if dependencies are standalone libs just put them in the nodemodules dir too - Rene Pot
as long as the dependencies aren't requiring core modules themselves - Rene Pot
So where do I put the node_modules directory? In the lib directory? - Yahya Uddin

1 Answers

0
votes

Prior to Titanium SDK 6.0.0 the copy/paste method was the only way to use node modules.

With the Titanium SDK 6.0.0 and going forward there is official support to use npm packages. The release notes are here and the Jira ticket TIMOB-16078 that tracked this feature request.