In Electron app, how can I access appId
which I have specified in "build"
section of package.json
:
"build": {
"appId": "com.myapp.Something"
}
In development I can import package.json
and access it directly, however "build"
section is gone from the packaged app. I want to use that id for node-notifier.
You could use:
var fs = require("fs");
var appId = JSON.parse(fs.readFileSync("path_to_package.json", 'utf8')).build.appId;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With