TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Writing cross-platform Node.js

9 pointsby shapeshedabout 11 years ago

2 comments

malandrewabout 11 years ago
What about pre-install scripts? The problem I&#x27;ve encountered with them is that npm still hasn&#x27;t installed the dependencies in your package.json, so you can&#x27;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&#x27; `osenv` module will help you get the home directory cross platform.<p><pre><code> var osenv = require(&quot;osenv&quot;); var homePath = osenv.home(); </code></pre> <a href="https://github.com/isaacs/osenv" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;isaacs&#x2F;osenv</a>
malandrewabout 11 years ago
How timely since I&#x27;m working on this issue right now.<p>The biggest issue I&#x27;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?