How to use Node.js libraries with native dependencies

I’m building an application using ionic 2, for mobile devices (mainly ios,and android) .
I want to use this Node.js library from my code node-ytdl-core. The library has some native call to the filesystem.

I have done a bit of reasearch and found out about jxcore-cordova, which ports jxcore to cordova projects, as a plugin and lets your use Node.js libraries.

My question is how do i add this plugin to my ionic project ? Note that if i run the install_and_run script, it build a new cordova project, with the plugin installed, How can i port this for ionic ?

Thanks for the help.