ericwlange / AndroidJSCore

AndroidJSCore allows Android developers to use JavaScript natively in their apps.
468 stars 78 forks source link

NodeJs Packages in AndroidJSCore #37

Closed maPaydar closed 8 years ago

maPaydar commented 8 years ago

can i use node packages in AndroidJSCore ? i had some researches , in this link https://blog.risingstack.com/running-node-modules-in-your-ios-project/ used node packs in javascriptcore in swift, i wanna implement it in AndroidJSCore .

ericwlange commented 8 years ago

Yes, you should be able to run Node packages if they have been run through browserify. The require() function is not supported by core JavaScript, but browserify should solve that particular problem. However, keep in mind that this is not a Node runtime environment (I am actually experimenting with that now), so if your package depends on things like fs and process, these won't be available.