timothyarmes / packagecheck

Checks to see if package dependencies used by a Meteor package are themselves up to date.
MIT License
16 stars 3 forks source link

Windows compatible? Coffeescript? #8

Open fabyeah opened 8 years ago

fabyeah commented 8 years ago

When I try to run packagecheck it says The system cannot find the path specified.

Then I changed all the bash stuff in packagecheck, packagecheck.cmd and _nodemodules/packagecheck/run to node and now it at least runs the run file, but says SyntaxError for the # coffeescript comments.

I removed all of those and then I get

ulimit -Sn 2048
       ^^^^
SyntaxError: Unexpected number

What do I do? (Im on Win10 btw)

timothyarmes commented 8 years ago

I've never tested on Windows I'm afraid, and I don't have a Windows box the develop on.

The ulimit call may not be necessary on Windows at all. You could try to conditionally remove it.

If you get it working then PRs are accepted :)

fabyeah commented 8 years ago

When the ulimit call is removed there are more syntax errors in run still.

I tried running index.js directly in packagecheck and packagecheck.cmd, which will run the script, but output [TypeError: Cannot read property 'semver' of undefined] for every dependency of every package...? :(

Is there any workaround or alternative to this package?

akanix42 commented 8 years ago

It's working for me on Windows, with no errors. To clarify @fabyeah's comment, to get it working on Windows just replace the contents of packagecheck.cmd with the following snippet:

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\node_modules\packagecheck\index.js" %*
) ELSE (
  @SETLOCAL
  @SET PATHEXT=%PATHEXT:;.JS;=;%
  node  "%~dp0\node_modules\packagecheck\index.js" %*
)
timothyarmes commented 8 years ago

I would be good if this could be made to automatically do the right thing based on Mac/Windows.

fabyeah commented 8 years ago

@nathantreid thanks a ton! It seems to work now, though I'm getting a new issue #11, hopefully unrelated.