Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dylannnn committed May 5, 2024
1 parent 36043b6 commit 26c981e
Show file tree
Hide file tree
Showing 7 changed files with 5,205 additions and 421 deletions.
3 changes: 3 additions & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "cz-conventional-changelog"
}
2 changes: 1 addition & 1 deletion .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Build
run: npm run mkh:build
- name: Semantic Release 📦
run: npx nx release --dry-run --first-release
run: npx semantic-release --debug --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# 2.0.0 (2024-05-03)

This was a version bump only, there were no code changes.
159 changes: 59 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,73 @@
![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)
![npm (scoped)](https://img.shields.io/npm/v/%40amfrontender/ngx-multi-keywords-highlighter)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/dylannnn/ngx-multi-keywords-highlighter)
[![Publish NGX Multi Keywords Highlighter](https://github.com/dylannnn/ngx-multi-keywords-highlighter/actions/workflows/release-main.yml/badge.svg)](https://github.com/dylannnn/ngx-multi-keywords-highlighter/actions/workflows/release-main.yml)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

## Screenshort
## Project Overview

![NGX Multi Keywords Highlighter](tools/assets/multi-keywords-highlighter.png "NGX Multi Keywords Highlighter")
Bored with the browser build-in search that hightlight the keyword? Missing a feature that highlight multiple keywords? This is the Ngx Multi Keywords Highlighter! This library provides a simple and intuitive way to highlight multiple keywords with different colors in your Angular applications. This library is designed to be easy to integrate into your existing projects, allowing you to focus on building amazing features without worrying about the underlying implementation details.

## How to use
![NGX Multi Keywords Highlighter](https://github.com/dylannnn/ngx-multi-keywords-highlighter/blob/main/tools/assets/multi-keywords-highlighter.png "NGX Multi Keywords Highlighter")

Add `"node_modules/@amfrontender/ngx-multi-keywords-highlighter/themes/index.scss"` or `"node_modules/@amfrontender/ngx-multi-keywords-highlighter/themes/themes.scss"` to your `angular.json` or `project.json` if you use NX to the build options of styles.
## Features

Import the `NgxMultiKeywordsHighlighterModule` to your `app.module.ts`
- Multi-keyword highlighting: Highlight multiple keywords in your text content using a variety of colors.
- Customizable colors: Choose from a range of pre-defined colors or define your own custom colors to match your application's branding.
- Easy integration: Simply install and import the library into your Angular project, and you're ready to start highlighting!
- Flexibility: Supports customization for multiple keywords highlight colors, thems.

```typescript
import { LABEL_POSITION, MATERIAL_COLOR, NgxMultiKeywordsHighlighterModule } from '@amfrontender/ngx-multi-keywords-highlighter';
```
## Getting Started

Add `NgxMultiKeywordsHighlighterModule` config to the imports
To get started with this project, follow these steps:

```typescript
@NgModule({
declarations: [...],
providers: [
provideAnimations(),
importProvidersFrom(
NgxMultiKeywordsHighlighterModule.forRoot({
themeColor: MATERIAL_COLOR.ACCENT,
enableToggleLabel: true,
toggleLabelPosition: LABEL_POSITION.BEFORE,
enableHighlighterTooltip: 'On/Off',
linkToCopyright: true,
minWidth: 320,
appRoot: storyRoot,
}),
),
],
bootstrap: [...],
})
export class AppModule {}
```
- Install the library using npm or yarn: `npm install @amfrontender/ngx-multi-keywords-highlighter`
- Import the library and config for your Angular project:

Add selector to the html
1. Add `"node_modules/@amfrontender/ngx-multi-keywords-highlighter/themes/index.scss"` or `"node_modules/@amfrontender/ngx-multi-keywords-highlighter/themes/themes.scss"` to your `angular.json` or `project.json` if you use NX to the build options of styles.

```html
<mkh-multi-keywords-highlighter class="custom-lib"></mkh-multi-keywords-highlighter>
```
2. Import the `NgxMultiKeywordsHighlighterModule` to your `app.module.ts`

For more advanced usages, please check the storybook or the demo app
```typescript
import { LABEL_POSITION, MATERIAL_COLOR, NgxMultiKeywordsHighlighterModule } from '@amfrontender/ngx-multi-keywords-highlighter';
```

## Semantic Commits
3. Add `NgxMultiKeywordsHighlighterModule` config to the imports

```typescript
@NgModule({
declarations: [...],
providers: [
provideAnimations(),
importProvidersFrom(
NgxMultiKeywordsHighlighterModule.forRoot({
themeColor: MATERIAL_COLOR.ACCENT,
enableToggleLabel: true,
toggleLabelPosition: LABEL_POSITION.BEFORE,
enableHighlighterTooltip: 'On/Off',
linkToCopyright: true,
minWidth: 320,
appRoot: storyRoot,
}),
),
],
bootstrap: [...],
})
export class AppModule {}
```

4. Add the lib tag to your component html

```html
<mkh-multi-keywords-highlighter class="custom-lib"></mkh-multi-keywords-highlighter>
```

For more advanced usages, please check the storybook for the library or the demo app

## Development/Contribution

TBD

### Semantic Commits

<!-- prettier-ignore-start -->
| Type | Notes |
Expand All @@ -69,69 +87,10 @@ For more advanced usages, please check the storybook or the demo app
| test | Adding missing tests |
<!-- prettier-ignore-end -->

## Branches

### Feature Branches

#### Release locally with Vadaccio to test

```sh
docker compose up --build -d
```

#### CI Tasks

- Lint all
- Unit Test all
- E2E Test all
- Chromatic Test (TBD)
- Build

### Beta Branch

Beta branch is for pre-release

#### CI Tasks

- Lint all
- Unit Test all
- E2E Test all
- Chromatic Test (TBD)
- Build

### Next Branch

Any new feature, major version update branch

#### CI Tasks

- Lint all
- Unit Test all
- E2E Test all
- Chromatic Test (TBD)
- Build
-

### Develop Branch

Before release, for testing

#### CI Tasks

- Lint all
- Unit Test all
- E2E Test all
- Chromatic Test (TBD)
- Build

### Main Branch
## License

Production ready branch
The Library is released under the MIT License. See [LICENSE](LICENSE) for more information.

#### CI Tasks
## Contact

- Lint all
- Unit Test all
- E2E Test all
- Chromatic Test (TBD)
- Build
If you have any questions, need help with integration, or want to discuss new features, please don't hesitate to open an Issue from github repository.
2 changes: 1 addition & 1 deletion libs/ngx-multi-keywords-highlighter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amfrontender/ngx-multi-keywords-highlighter",
"version": "2.0.1",
"version": "2.1.0-development",
"license": "MIT",
"author": "Yunfei Li <dylannnnlee@gmail.com> (https://yunfei.li)",
"homepage": "https://github.com/dylannnn/ngx-multi-keywords-highlighter#readme",
Expand Down
Loading

0 comments on commit 26c981e

Please sign in to comment.