0

I would like to run a function based of the version of my node-webkit app from the package.json file. How do I get this version number?

I'm not talking about:

process.versions['node-webkit'];

Which just shows the node-webkit version.

1 Answers1

3

You can get the manifest as an object in nw, using App. Just extract the version there:

var gui = require('nw.gui');
var myAppVersion = gui.App.manifest.version;

See also https://github.com/rogerwang/node-webkit/wiki/App#manifest

Mar
  • 449
  • 4
  • 8