We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 00c0705 + d285a6b commit f35eab1Copy full SHA for f35eab1
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "electron-json-config",
3
- "version": "1.1.0",
+ "version": "1.2.0",
4
"description": "Simply set and get configuration from a json file for your Electron app",
5
"main": "src/index.js",
6
"keywords": [
src/index.js
@@ -8,7 +8,7 @@ const file = (electron.app || electron.remote.app).getPath('userData')+'/config.
8
if(!exists.sync(file)) {
9
fs.writeFileSync(file, '{}');
10
}
11
-var config = require(file);
+var config = JSON.parse(fs.readFileSync(file));
12
13
const sync = function() {
14
fs.writeFileSync(file, JSON.stringify(config));
0 commit comments