From ec4e3bc1ee6ba4655642e5740cabb864bcb70275 Mon Sep 17 00:00:00 2001 From: Kiro Risk <565580+krisk@users.noreply.github.com> Date: Mon, 23 Oct 2023 19:25:22 -0700 Subject: [PATCH] fix: imports --- docs/.vuepress/components/Demo/Demo.vue | 11 +++++------ docs/.vuepress/components/Jobs/Jobs.vue | 2 +- docs/getting-started/different-builds.md | 14 +++++++------- docs/getting-started/installation.md | 4 ++-- runner.js | 1 + 5 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 runner.js diff --git a/docs/.vuepress/components/Demo/Demo.vue b/docs/.vuepress/components/Demo/Demo.vue index 262b76c9d..fcc6dd077 100644 --- a/docs/.vuepress/components/Demo/Demo.vue +++ b/docs/.vuepress/components/Demo/Demo.vue @@ -50,8 +50,7 @@ import { Stopwatch } from '@sapphire/stopwatch' import { isNullish, isObject, tryParseJSON } from '@sapphire/utilities' import { reactive } from 'vue' -import type FuseTypes from '../../../../dist/fuse' -import Fuse from '../../../../dist/fuse.esm.js' +import Fuse, { IFuseOptions } from '../../../../dist/fuse' import Books from './books.js' import MonacoEditor from './MonacoEditor.vue' @@ -62,10 +61,10 @@ interface State { resultsData: string count: number | null searchTime: string | null - fuseSearchOptions: FuseTypes.IFuseOptions + fuseSearchOptions: IFuseOptions } -const defaultFuseSearchOptions: FuseTypes.IFuseOptions = { +const defaultFuseSearchOptions: IFuseOptions = { isCaseSensitive: false, includeScore: false, shouldSort: true, @@ -83,7 +82,7 @@ const defaultFuseSearchOptions: FuseTypes.IFuseOptions = { function codify( searchPattern: string, - fuseSearchOptions: FuseTypes.IFuseOptions = defaultFuseSearchOptions + fuseSearchOptions: IFuseOptions = defaultFuseSearchOptions ): string { return ` const Fuse = require('fuse.js'); @@ -149,7 +148,7 @@ function onSearchPatternKeyUp() { function doFuseSearch(fuseSearchOptions = state.fuseSearchOptions) { try { - const fuseOptions: FuseTypes.IFuseOptions = { + const fuseOptions: IFuseOptions = { keys: ['title', 'author.firstName'], ...fuseSearchOptions } diff --git a/docs/.vuepress/components/Jobs/Jobs.vue b/docs/.vuepress/components/Jobs/Jobs.vue index 044b4034c..95a0b0ca2 100644 --- a/docs/.vuepress/components/Jobs/Jobs.vue +++ b/docs/.vuepress/components/Jobs/Jobs.vue @@ -25,7 +25,7 @@ ``` @@ -67,7 +67,7 @@ You can directly import `Fuse` as an ES module from the deno.land/x service: ```typescript // @deno-types="https://deno.land/x/fuse@v6.6.2/dist/fuse.d.ts" -import Fuse from 'https://deno.land/x/fuse@v6.6.2/dist/fuse.esm.min.js' +import Fuse from 'https://deno.land/x/fuse@v6.6.2/dist/fuse.min.mjs' ``` diff --git a/runner.js b/runner.js new file mode 100644 index 000000000..703f15b80 --- /dev/null +++ b/runner.js @@ -0,0 +1 @@ +import Fuse from 'fuse.js'