![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
svelte-algolia
Advanced tools
Readme
This package was inspired by the official gatsby-plugin-algolia
.
Install with yarn
or npm
yarn add -D svelte-algolia
npm i -D svelte-algolia
Create an algoliaConfig
:
const algoliaConfig = {
appId: secrets.algoliaAppId,
apiKey: secrets.algoliaAdminKey,
indices: [
{ name: `pokedex`, getData: pokemonDataLoader },
{ name: `hitchHikersGuide`, getData: guideGetter },
],
}
Pass your config to the indexAlgolia
export from this package:
import { indexAlgolia } from 'svelte-algolia'
indexAlgolia(algoliaConfig)
const defaultConfig = {
verbosity: 1, // 0, 1 or 2 for no/some/lots of logging
partialUpdates: false, // if true, figures out diffs between existing
// items and new ones and only uploads, otherwise, completely overrides
// each index on every call to indexAlgolia()
matchFields: [], // (only used when partialUpdates is true) keys of fields to
// check for whether an item has changed; could e.g. be a timestamp, hash or
// an ID that's updated every time the item has changed
}
rollup
pluginTo use this package as part of a rollup
build (e.g. in a Svelte or Sapper app), simply include it in your plugins
array:
// rollup.config.js
import { indexAlgolia } from 'svelte-algolia'
const algoliaConfig = {
// see config options above
}
// check if running in build or development mode
const dev = process.env.NODE_ENV === `development`
export default {
input: './src/index.js',
output: {
file: './build/bundle.js',
format: 'iife',
name: 'bundle'
plugins: [
// to save Algolia indexing operations, you may want to only
// update your indices when building your app for production
!dev && indexAlgolia(algoliaConfig),
]
}
}
PRs are welcome but best open an issue first to discuss any changes.
FAQs
Algolia server-side index updater and client-side search component for Svelte projects
The npm package svelte-algolia receives a total of 3 weekly downloads. As such, svelte-algolia popularity was classified as not popular.
We found that svelte-algolia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.