diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..18531b3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,23 @@ +name: CI +on: + - push + - pull_request +jobs: + test: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: + - 14 + - 12 + - 10 + - 8 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f3fa8cd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - '10' - - '8' diff --git a/package.json b/package.json index de3b45f..f82ef55 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,11 @@ "description": "Easily load and save config without having to think about where and how", "license": "BSD-2-Clause", "repository": "yeoman/configstore", + "funding": "https://github.com/yeoman/configstore?sponsor=1", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" + "url": "https://sindresorhus.com" }, "engines": { "node": ">=8" diff --git a/readme.md b/readme.md index 6d8e2d0..f5e84bf 100644 --- a/readme.md +++ b/readme.md @@ -1,21 +1,19 @@ -# configstore [![Build Status](https://travis-ci.org/yeoman/configstore.svg?branch=master)](https://travis-ci.org/yeoman/configstore) +# configstore > Easily load and persist config without having to think about where and how -The config is stored in a JSON file located in `$XDG_CONFIG_HOME` or `~/.config`.
+The config is stored in a JSON file located in `$XDG_CONFIG_HOME` or `~/.config`.\ Example: `~/.config/configstore/some-id.json` -*If you need this for Electron, check out [`electron-store`](https://github.com/sindresorhus/electron-store) instead.*
+*If you need this for Electron, check out [`electron-store`](https://github.com/sindresorhus/electron-store) instead.*\ *And check out [`conf`](https://github.com/sindresorhus/conf) for an updated approach to this concept.* - ## Install ``` $ npm install configstore ``` - ## Usage ```js @@ -42,7 +40,6 @@ console.log(config.get('awesome')); //=> undefined ``` - ## API ### Configstore(packageName, defaults?, options?) @@ -67,14 +64,14 @@ Type: `object` ##### globalConfigPath -Type: `boolean`
+Type: `boolean`\ Default: `false` Store the config at `$CONFIG/package-name/config.json` instead of the default `$CONFIG/configstore/package-name.json`. This is not recommended as you might end up conflicting with other tools, rendering the "without having to think" idea moot. ##### configPath -Type: `string`
+Type: `string`\ Default: Automatic **Please don't use this option unless absolutely necessary and you know what you're doing.** @@ -127,7 +124,6 @@ config.all = { }; ``` - ---