I'm writing new cordova hooks, and decided to do them in nodejs

First problem I hit was dependencies for the hook scripts:
so far I have two scripts:
cordovaUserProject/hook/before_prepare/wl_b_prepare.js
cordovaUserProject/hook/after_compile/wl_a_compile.js

I have both starting like this:
#!/usr/bin/env node

var shell = require('shelljs'),
nopt  = require('nopt');

shell.echo('Running Worklight Cordova Hook');


I get errors because it can't find dependencies 'shelljs' and 'nopt'

To resolve this I would need the user or another hook before this one to
install the node_modules in one of these places

cordovaUserProject/node_modules/
cordovaUserProject/hook/node_modules/
cordovaUserProject/hook/before_prepare/node_modules/
cordovaUserProject/hook/after_compile/node_modules/

What would be a best practice?
Who get's to install? (user or me)
Where to install?



-- 
Carlos Santana
<csantan...@gmail.com>

Reply via email to