Skip to content

Commit ec4e3bc

Browse files
committed
fix: imports
1 parent d1d63a0 commit ec4e3bc

5 files changed

Lines changed: 16 additions & 16 deletions

File tree

docs/.vuepress/components/Demo/Demo.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
import { Stopwatch } from '@sapphire/stopwatch'
5151
import { isNullish, isObject, tryParseJSON } from '@sapphire/utilities'
5252
import { reactive } from 'vue'
53-
import type FuseTypes from '../../../../dist/fuse'
54-
import Fuse from '../../../../dist/fuse.esm.js'
53+
import Fuse, { IFuseOptions } from '../../../../dist/fuse'
5554
import Books from './books.js'
5655
import MonacoEditor from './MonacoEditor.vue'
5756
@@ -62,10 +61,10 @@ interface State {
6261
resultsData: string
6362
count: number | null
6463
searchTime: string | null
65-
fuseSearchOptions: FuseTypes.IFuseOptions<never>
64+
fuseSearchOptions: IFuseOptions<never>
6665
}
6766
68-
const defaultFuseSearchOptions: FuseTypes.IFuseOptions<never> = {
67+
const defaultFuseSearchOptions: IFuseOptions<never> = {
6968
isCaseSensitive: false,
7069
includeScore: false,
7170
shouldSort: true,
@@ -83,7 +82,7 @@ const defaultFuseSearchOptions: FuseTypes.IFuseOptions<never> = {
8382
8483
function codify(
8584
searchPattern: string,
86-
fuseSearchOptions: FuseTypes.IFuseOptions<never> = defaultFuseSearchOptions
85+
fuseSearchOptions: IFuseOptions<never> = defaultFuseSearchOptions
8786
): string {
8887
return `
8988
const Fuse = require('fuse.js');
@@ -149,7 +148,7 @@ function onSearchPatternKeyUp() {
149148
150149
function doFuseSearch(fuseSearchOptions = state.fuseSearchOptions) {
151150
try {
152-
const fuseOptions: FuseTypes.IFuseOptions<never> = {
151+
const fuseOptions: IFuseOptions<never> = {
153152
keys: ['title', 'author.firstName'],
154153
...fuseSearchOptions
155154
}

docs/.vuepress/components/Jobs/Jobs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<script setup lang="ts">
2727
import { ref } from 'vue'
28-
import Fuse from '../../../../dist/fuse.esm.js'
28+
import Fuse from '../../../../dist/fuse'
2929
import jobsData from './jobs'
3030
3131
const results = ref(jobsData)

docs/getting-started/different-builds.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
In the [`dist/` directory of the npm package](https://cdn.jsdelivr.net/npm/fuse.js/dist/) you will find many different builds of Fuse.js. Here's an overview of the difference between them.
44

5-
| | UMD | CommonJS | ES Module (for bundlers) |
6-
| ---------------------- | ----------------- | -------------------- | ------------------------ |
7-
| **Full** | fuse.js | fuse.common.js | fuse.esm.js |
8-
| **Basic** | fuse.basic.js | fuse.basic.common.js | fuse.basic.esm.js |
9-
| **Full (Production)** | fuse.min.js | - | fuse.esm.min.js |
10-
| **Basic (Production)** | fuse.basic.min.js | - | fuse.basic.esm.min.js |
5+
| | UMD | CommonJS | ES Module (for bundlers) |
6+
| ---------------------- | ----------------- | -------------- | ------------------------ |
7+
| **Full** | fuse.js | fuse.cjs | fuse.mjs |
8+
| **Basic** | fuse.basic.js | fuse.basic.cjs | fuse.basic.mjs |
9+
| **Full (Production)** | fuse.min.js | - | fuse.esm.min.js |
10+
| **Basic (Production)** | fuse.basic.min.js | - | fuse.basic.esm.min.js |
1111

1212
### Terms
1313

@@ -19,6 +19,6 @@ In the [`dist/` directory of the npm package](https://cdn.jsdelivr.net/npm/fuse.
1919

2020
- **[CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1)**: CommonJS builds are intended for use with older bundlers like [browserify](http://browserify.org/) or [webpack 1](https://webpack.github.io). The file for these bundlers (`pkg.main`) is the CommonJS build (`fuse.common.js`).
2121

22-
- **[ES Module](http://exploringjs.com/es6/ch_modules.html)**: Intended for use with modern bundlers like [Webpack 2](https://webpack.js.org) or [Rollup](http://rollupjs.org/). The file for these bundlers (`pkg.module`) is the ES Module build (`fuse.esm.js`).
22+
- **[ES Module](http://exploringjs.com/es6/ch_modules.html)**: Intended for use with modern bundlers like [Webpack 2](https://webpack.js.org) or [Rollup](http://rollupjs.org/). The file for these bundlers (`pkg.module`) is the ES Module build (`fuse.mjs`).
2323

2424
<Donate />

docs/getting-started/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ If you are using native ES Modules, there is also an ES Modules compatible build
5050

5151
```html
5252
<script type="module">
53-
import Fuse from 'https://cdn.jsdelivr.net/npm/fuse.js@6.6.2/dist/fuse.esm.js'
53+
import Fuse from 'https://cdn.jsdelivr.net/npm/fuse.js@6.6.2/dist/fuse.mjs'
5454
</script>
5555
```
5656

@@ -67,7 +67,7 @@ You can directly import `Fuse` as an ES module from the deno.land/x service:
6767

6868
```typescript
6969
// @deno-types="https://deno.land/x/fuse@v6.6.2/dist/fuse.d.ts"
70-
import Fuse from 'https://deno.land/x/fuse@v6.6.2/dist/fuse.esm.min.js'
70+
import Fuse from 'https://deno.land/x/fuse@v6.6.2/dist/fuse.min.mjs'
7171
```
7272

7373
<Donate />

runner.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import Fuse from 'fuse.js'

0 commit comments

Comments
 (0)