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
Post a Comment