Command line node-webkit app

I would like to be able to create a node-webkit application (nw.js) and then run it from the command line with arguments to go into the application itself. I would like to be able to run a command release ./project

and run its GUI by passing the directory from the CLI argument to node-webkit.

I have managed to compile the application so far, but I have no way of opening it from the command line and then passing the callback completed

back to the command line after closing it.

How can I create a command line interface for a desktop application built with node-webkit?

+3


source to share


1 answer


You can use the following to get an array of command line arguments.



// Load native UI library.
var gui = require('nw.gui');
var commands = gui.App.argv;

      

+1


source







All Articles