4 ms·
Writing cross-platform Node.js
- malandrew 13y agoHow timely since I'm working on this issue right now. 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. If anyone else here is working on cross-platform node.js code, how do you handle automated testing?
- malandrew 13y agoWhat 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). Also izs' `osenv` module will help you get the home directory cross platform. var osenv = require("osenv"); var homePath = osenv.home(); https://github.com/isaacs/osenv https://github.com/isaacs/osenv