Skip to content

Commit

Permalink
Update conf to 2.0 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
trodi authored and sindresorhus committed May 30, 2018
1 parent bab1a46 commit 9882bdc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions fixture-cwd.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ process.on('uncaughtException', err => {
console.log(electron.app.getPath('userData'));

const store = new Store({cwd: 'foo'});
store.set('unicorn', '🦄');
console.log(store.path);

const store2 = new Store({cwd: path.join(__dirname, 'bar')});
store2.set('ava', '🚀');
console.log(store2.path);

electron.app.quit();
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"save"
],
"dependencies": {
"conf": "^1.3.0"
"conf": "^2.0.0"
},
"devDependencies": {
"ava": "*",
Expand Down
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ It also has the added bonus of ensuring the config file's integrity. If the file

When specified, the store will be encrypted using the [`aes-256-cbc`](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation) encryption algorithm.

#### fileExtension

type: `string`<br>
Default: `json`

Extension of the config file.

You would usually not need this, but could be useful if you want to interact with a file with a custom file extension that can be associated with your app. These might be simple save/export/preference files that are intended to be shareable or saved outside of the app.

### Instance

You can use [dot-notation](https://github.com/sindresorhus/dot-prop) in a `key` to access nested properties.
Expand Down

0 comments on commit 9882bdc

Please sign in to comment.