node.js - Install node dependencies for Cordova plugin -


i'm writing cordova plugin, has node dependency 1 of hook scripts. ideally when plugin installed:

$ cordova plugin add my-cordova-plugin 

i run npm install if package.json has dependencies listed.

does cordova support feature in way? have missed something?

my current solution hook runs after_plugin_install:

module.exports = function (context) {     var shell = context.requirecordovamodule('shelljs');      shell.cd(context.opts.plugin.dir);     shell.exec('npm install'); }; 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -