Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Writing cross-platform Node.js (shapeshed.com)
9 points by shapeshed on March 25, 2014 | hide | past | favorite | 2 comments


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).

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


How 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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: