Skip to content

Commit

Permalink
chore: prepare v2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jadengis committed Jun 24, 2023
1 parent 4065106 commit 4a33c37
Show file tree
Hide file tree
Showing 8 changed files with 2,959 additions and 825 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Build

on: push

Expand All @@ -11,7 +11,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
- name: Cache .npm
id: npm-cache
uses: actions/cache@v2
Expand All @@ -32,5 +32,5 @@ jobs:
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm install
- name: Lint workspace
run: npm run test
- name: Build library
run: npm run build
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
- name: Cache .npm
id: npm-cache
uses: actions/cache@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Test

on: push

Expand All @@ -11,7 +11,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
- name: Cache .npm
id: npm-cache
uses: actions/cache@v2
Expand All @@ -32,5 +32,5 @@ jobs:
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm install
- name: Lint workspace
run: npm run build
- name: Run tests
run: npm run test
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
[![Test](https://github.com/jadengis/ngx-clarity/actions/workflows/build.yml/badge.svg)](https://github.com/jadengis/ngx-clarity/actions/workflows/build.yml)
[![Lint](https://github.com/jadengis/ngx-clarity/actions/workflows/lint.yml/badge.svg)](https://github.com/jadengis/ngx-clarity/actions/workflows/lint.yml)


A useful Angular module that automatically injects the script tag required to use [Microsoft Clarity](https://clarity.microsoft.com/).
A useful Angular library that automatically injects the script tag required to use [Microsoft Clarity](https://clarity.microsoft.com/).

## Installation

Expand All @@ -26,27 +25,39 @@ yarn add ngx-clarity
| Version | Angular Version |
| ------- | --------------- |
| `1.x.x` | `>=13 <15` |
| `2.x.x` | `>=15 <17` |

## Features

- Automatically inject scripts for [Microsoft Clarity](https://clarity.microsoft.com/).

## Usage

Import the `NgxClarityModule` into your `AppModule` using the `forRoot` method to provide the required configuration.
Import `provideClarity` from `ngx-clarity` and pass the required configuration when using it as a provider during application bootstrap.

```typescript
import { NgxClarityModule } from 'ngx-clarity';
import { provideClarity } from 'ngx-clarity';

@NgModule({
imports: [
NgxClarityModule.forRoot({
providers: [
provideClarity({
enabled: true,
projectId: 'my-project-id',
}),
],
})
export class AppModule {}

// Or if you are using standalone bootstrap

bootstrapApplication(AppComponent, {
providers: [
provideClarity({
enabled: true,
projectId: 'my-project-id',
}),
],
});
```

The supported configuration parameters are:
Expand Down
Loading

0 comments on commit 4a33c37

Please sign in to comment.