nw.js: Simply Create a Windows Shortcut to open a folder/package.json with NW.JS

93 Views Asked by At

I'm using nw.js to create some 'apps' for personal use, not distribution. Once you have a package and basic app created, you can drag the folder with the package.json for your app to nw.js .exe and drop it onto nw.js to run the app.

Actually creating an app looks like a pita. I'm not distributing the apps to anyone else anyway, there's no reason to keep repackaging nw.js with the apps I'm building either.

So I would like a Windows shortcut that does the same thing as dragging the folder to the NW.JS .exe; a shortcut that activates my nwjs apps without them having to be packaged further. When I drag and hover with the folder over NW.JS, it says 'open with nwjs' if that's helpful/relevant. I know completing the drop works, but I want a shortcut that does this instead for each of my personal apps.

Can someone tell me how to create a shortcut that will drag and drop a folder to nwjs .exe or activate the package and app with nwjs?

I've done the basic packaging, but I want something like the method described in question.

Thank you for help.

1

There are 1 best solutions below

2
On

Simply create a shortcut to nw.exe with the folder of your app as the argument, ex. "nw.exe C:/path-to-your-app" if NW.js is in your PATH.