@naniteninja/profile-comparison-lib 0.0.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -8,10 +8,10 @@ Angular library that renders a side-by-side profile comparison (two profile imag
|
|
|
8
8
|
|
|
9
9
|
## Quickstart
|
|
10
10
|
|
|
11
|
-
1. **Install the package**
|
|
11
|
+
1. **Install the package and peer dependencies** (including TensorFlow; required for Vite and other bundlers):
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install profile-comparison-lib
|
|
14
|
+
npm install @naniteninja/profile-comparison-lib @angular/core@^20 @angular/common@^20 @tensorflow/tfjs @tensorflow-models/universal-sentence-encoder
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
2. **Provide the backend URL**
|
|
@@ -19,7 +19,7 @@ Angular library that renders a side-by-side profile comparison (two profile imag
|
|
|
19
19
|
In `app.config.ts` (or `AppModule`):
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
|
-
import { PROFILE_COMPARISON_API_BASE_URL } from 'profile-comparison-lib';
|
|
22
|
+
import { PROFILE_COMPARISON_API_BASE_URL } from '@naniteninja/profile-comparison-lib';
|
|
23
23
|
|
|
24
24
|
providers: [
|
|
25
25
|
{ provide: PROFILE_COMPARISON_API_BASE_URL, useValue: 'https://your-backend.com/api' },
|
|
@@ -41,7 +41,7 @@ Angular library that renders a side-by-side profile comparison (two profile imag
|
|
|
41
41
|
Import the module and add the component to a template:
|
|
42
42
|
|
|
43
43
|
```typescript
|
|
44
|
-
import { ProfileComparisonLibModule } from 'profile-comparison-lib';
|
|
44
|
+
import { ProfileComparisonLibModule } from '@naniteninja/profile-comparison-lib';
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
```html
|
|
@@ -66,10 +66,10 @@ No key-entry modals or API key inputs appear in the library; all keys and third-
|
|
|
66
66
|
|
|
67
67
|
1. Create or open an Angular app (Angular ^20.0.0).
|
|
68
68
|
|
|
69
|
-
2. Install the library and peer dependencies:
|
|
69
|
+
2. Install the library and peer dependencies (TensorFlow is required for dependency optimization in Vite etc.):
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
npm install profile-comparison-lib @angular/core@^20 @angular/common@^20
|
|
72
|
+
npm install @naniteninja/profile-comparison-lib @angular/core@^20 @angular/common@^20 @tensorflow/tfjs @tensorflow-models/universal-sentence-encoder
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
3. Add the backend URL provider in `app.config.ts`:
|
|
@@ -77,7 +77,7 @@ No key-entry modals or API key inputs appear in the library; all keys and third-
|
|
|
77
77
|
```typescript
|
|
78
78
|
import { ApplicationConfig } from '@angular/core';
|
|
79
79
|
import { provideHttpClient } from '@angular/common/http';
|
|
80
|
-
import { PROFILE_COMPARISON_API_BASE_URL } from 'profile-comparison-lib';
|
|
80
|
+
import { PROFILE_COMPARISON_API_BASE_URL } from '@naniteninja/profile-comparison-lib';
|
|
81
81
|
|
|
82
82
|
export const appConfig: ApplicationConfig = {
|
|
83
83
|
providers: [
|
|
@@ -90,7 +90,7 @@ No key-entry modals or API key inputs appear in the library; all keys and third-
|
|
|
90
90
|
Or in `AppModule`:
|
|
91
91
|
|
|
92
92
|
```typescript
|
|
93
|
-
import { PROFILE_COMPARISON_API_BASE_URL } from 'profile-comparison-lib';
|
|
93
|
+
import { PROFILE_COMPARISON_API_BASE_URL } from '@naniteninja/profile-comparison-lib';
|
|
94
94
|
|
|
95
95
|
@NgModule({
|
|
96
96
|
providers: [
|
|
@@ -103,7 +103,7 @@ No key-entry modals or API key inputs appear in the library; all keys and third-
|
|
|
103
103
|
4. Import the module where you use the component:
|
|
104
104
|
|
|
105
105
|
```typescript
|
|
106
|
-
import { ProfileComparisonLibModule } from 'profile-comparison-lib';
|
|
106
|
+
import { ProfileComparisonLibModule } from '@naniteninja/profile-comparison-lib';
|
|
107
107
|
|
|
108
108
|
@NgModule({
|
|
109
109
|
imports: [ProfileComparisonLibModule, ...],
|
|
@@ -190,4 +190,4 @@ The library calls your backend at `POST {baseUrl}/profile/compare-full` with bod
|
|
|
190
190
|
ng build profile-comparison-lib
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
Output is in `dist/profile-comparison-lib/` (FESM, typings, package.json). Peer dependencies: Angular `^20.0.0`
|
|
193
|
+
Output is in `dist/profile-comparison-lib/` (FESM, typings, package.json). Peer dependencies: Angular `^20.0.0` and TensorFlow (`@tensorflow/tfjs`, `@tensorflow-models/universal-sentence-encoder`).
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naniteninja/profile-comparison-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^20.0.0",
|
|
6
|
-
"@angular/core": "^20.0.0"
|
|
6
|
+
"@angular/core": "^20.0.0",
|
|
7
|
+
"@tensorflow-models/universal-sentence-encoder": "^1.3.3",
|
|
8
|
+
"@tensorflow/tfjs": "^4.22.0"
|
|
7
9
|
},
|
|
8
10
|
"dependencies": {
|
|
9
11
|
"tslib": "^2.3.0"
|