svelte-algolia
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "svelte-algolia", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Algolia plugin for Svelte", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"module": "src/main.js", | ||
"repository": "https://github.com/janosh/svelte-algolia", | ||
"homepage": "https://github.com/janosh/svelte-algolia#readme", | ||
"bugs": { | ||
"url": "https://github.com/janosh/svelte-algolia/issues" | ||
}, | ||
"author": "Janosh Riebesell", | ||
"license": "MIT", | ||
"private": false, | ||
"type": "module", | ||
"devDependencies": { | ||
"algoliasearch": "^4.5.1" | ||
"algoliasearch": "^4.5.1", | ||
"ava": "^3.13.0", | ||
"eslint": "^7.12.1", | ||
"esm": "^3.2.25", | ||
"prettier": "^2.1.2" | ||
}, | ||
"scripts": { | ||
"test": "ava", | ||
"prepublish": "ava" | ||
}, | ||
"files": [ | ||
"src/**/*.js" | ||
], | ||
"keywords": [ | ||
"algolia", | ||
"plugin" | ||
], | ||
"prettier": { | ||
"semi": false, | ||
"singleQuote": true | ||
} | ||
} |
@@ -7,4 +7,38 @@ <p align="center"> | ||
```sh | ||
yarn add -D svelte-algolia | ||
``` | ||
## Usage | ||
1. Install with `yarn` or `npm` | ||
```sh | ||
yarn add -D svelte-algolia | ||
``` | ||
```sh | ||
npm i -D svelte-algolia | ||
``` | ||
2. Create an `algoliaConfig`: | ||
```js | ||
const algoliaConfig = { | ||
appId: secrets.algoliaAppId, | ||
apiKey: secrets.algoliaAdminKey, | ||
partialUpdates: true, | ||
indices: [ | ||
{ name: `pokedex`, getData: pokemonDataLoader }, | ||
{ name: `hitchHikersGuide`, getData: guideGetter }, | ||
], | ||
} | ||
``` | ||
3. Pass your config to the `indexAlgolia` export from this package: | ||
```js | ||
import { indexAlgolia } from 'svelte-algolia' | ||
indexAlgolia(algoliaConfig) | ||
``` | ||
## Contribute | ||
PRs are welcome but best open an issue first to discuss any changes. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
8629
5
149
0
1
44
5
1
No