node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

nwjs-j5-fix

nwjs-j5-fix

This Node.js module enables the use of the Johnny-Five module inside NW.js v0.13 and above. It fixes issues with the process.stdin object of NW.js. As of version 0.13-rc2 of NW.js, the problem still exists.

This is a modularized version of Rick Waldron's code as seen in the Getting started with Johnny-Five and Node-Webkit tutorial.

Based on Rick's work, I have published an updated and simplified method to use Johnny-Five inside NW.js v0.13+. For more information, check out my tutorial on TangibleJS: Johnny-Five + NW.js = Kickass Physical Computing Environment.

Using it

To use it, you first need to install it inside your projet using npm. From the command-line, at the root of your project issue:

npm install nwjs-j5-fix

Then, simply add this line of code before requiring Johnny-Five:

nw.require("nwjs-johnny-five-fix").fix();

That's it!