ReadyTalk / gradle-readytalk-js

Conventions for ReadyTalk JavaScript projects using Node and Grunt.
http://oss.readytalk.com/gradle-readytalk-js
MIT License
2 stars 0 forks source link

Refactor to use nvm instead of upstream mooworks plugin #26

Open stormbeta opened 8 years ago

stormbeta commented 8 years ago

As nvm is rapidly becoming the de facto version manager for node, the JS plugin should probably make use of it to better align with vanilla node.js development.

Going further, it might be interesting to look at adding some of this functionality to the upstream nvm project, in particular having it inject the project-local node_modules/.bin into the PATH as part of nvm use.

stormbeta commented 8 years ago

Thoughts, @dansomething, @dwilson6, @joshuawarner32?

joshuawarner32 commented 8 years ago

I have no overall objections.

A few comments:

watsoncj commented 8 years ago

Have you considered using n instead of nvm? It's less invasive; doesn't require any environment setup. But it might assume write access to /usr/local.

https://github.com/tj/n On Fri, Jan 22, 2016 at 3:45 PM Joshua Warner notifications@github.com wrote:

I have no overall objections.

A few comments:

  • I'd rather not always install node per-project (at least not by default). What's the reasoning?
  • Don't muck with my shell prompt (even though I'm using fish, and this likely won't affect me anyway)

— Reply to this email directly or view it on GitHub https://github.com/ReadyTalk/gradle-readytalk-js/issues/26#issuecomment-174078205 .

dansomething commented 8 years ago

I'm with @joshuawarner32. I have no major concerns other than don't alter my shell prompt.

I'm not against using n though I would really like the nodew script work on Windows for the times I need it.

dwilson6 commented 8 years ago

Like the others have said, sounds good to me.

stormbeta commented 8 years ago

I had some time to look at this again, and put up a prototype static nvm wrapper here: https://github.com/stormbeta/nodew

@watsoncj You can use nvm without requiring environment setup - the above prototype works even if you don't have nvm installed.

@dansomething I agree about the Windows support, and that's unfortunately the main snag here since neither nvm nor n support windows (and the closest alternatives like nvm-windows require environment setup). As for the wrapper script, I can either generate a separate windows script like Gradle does, or look into syntax tricks to make a single polyglot.

dansomething commented 8 years ago

I can live w/o the Windows support. I'll give the prototype a try.