fix(build): Fix import paths, update CI workflows and upgrade dependencies for ESM compliance
This commit is contained in:
28
readme.md
28
readme.md
@@ -19,11 +19,7 @@ npm install @push.rocks/smartfuzzy --save
|
||||
First, ensure you import the necessary components:
|
||||
|
||||
```typescript
|
||||
import {
|
||||
Smartfuzzy,
|
||||
ObjectSorter,
|
||||
ArticleSearch
|
||||
} from '@push.rocks/smartfuzzy';
|
||||
import { Smartfuzzy, ObjectSorter, ArticleSearch } from '@push.rocks/smartfuzzy';
|
||||
```
|
||||
|
||||
### Basic String Matching
|
||||
@@ -58,7 +54,7 @@ interface ICar {
|
||||
const carList: ICar[] = [
|
||||
{ brand: 'BMW', model: 'M3' },
|
||||
{ brand: 'Mercedes Benz', model: 'E-Class' },
|
||||
{ brand: 'Volvo', model: 'XC90' }
|
||||
{ brand: 'Volvo', model: 'XC90' },
|
||||
];
|
||||
|
||||
const carSorter = new ObjectSorter<ICar>(carList);
|
||||
@@ -78,8 +74,22 @@ If your application involves searching through articles or similar textual conte
|
||||
import { IArticle } from '@tsclass/tsclass/content';
|
||||
|
||||
const articles: IArticle[] = [
|
||||
{ title: 'History of Berlin', content: 'Berlin has a rich history...', tags: ['history', 'Berlin'], timestamp: Date.now(), featuredImageUrl: null, url: null },
|
||||
{ title: 'Tourism in Berlin', content: 'Discover the vibrant city of Berlin...', tags: ['travel', 'Berlin'], timestamp: Date.now(), featuredImageUrl: null, url: null }
|
||||
{
|
||||
title: 'History of Berlin',
|
||||
content: 'Berlin has a rich history...',
|
||||
tags: ['history', 'Berlin'],
|
||||
timestamp: Date.now(),
|
||||
featuredImageUrl: null,
|
||||
url: null,
|
||||
},
|
||||
{
|
||||
title: 'Tourism in Berlin',
|
||||
content: 'Discover the vibrant city of Berlin...',
|
||||
tags: ['travel', 'Berlin'],
|
||||
timestamp: Date.now(),
|
||||
featuredImageUrl: null,
|
||||
url: null,
|
||||
},
|
||||
];
|
||||
|
||||
const articleSearch = new ArticleSearch(articles);
|
||||
@@ -99,7 +109,7 @@ Remember to always consider the specific requirements of your project when imple
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
|
||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||
|
||||
|
Reference in New Issue
Block a user