What about pre-install scripts? The problem I've encountered with them is that npm still hasn't installed the dependencies in your package.json, so you can't have any dependencies in your pre-install scripts (at least on first install. on subsequent installs they will work if the modules your script depends on has already been installed).<p>Also izs' `osenv` module will help you get the home directory cross platform.<p><pre><code> var osenv = require("osenv");
var homePath = osenv.home();
</code></pre>
<a href="https://github.com/isaacs/osenv" rel="nofollow">https://github.com/isaacs/osenv</a>
How timely since I'm working on this issue right now.<p>The biggest issue I'm struggling with is how to set up automated testing for cross-platform node.js code. vagrant-windows is dependent on the woefully out-of-date WinRM gem and no matter what workaround I try I simply cannot get windows working in vagrant. Furthermore I simply know too little about working with windows to even attempt to fix up the WinRM gem and vagrant-windows plugin.<p>If anyone else here is working on cross-platform node.js code, how do you handle automated testing?