@pykara/pykara-chat 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/README.md +50 -37
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,63 +1,76 @@
1
- # PykaraChat
1
+ # @pykara/pykara-chat
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
3
+ An Angular UI library (npm package) that provides a simple chat widget component.
4
4
 
5
- ## Code scaffolding
5
+ ---
6
6
 
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
7
+ ## Install
8
8
 
9
9
  ```bash
10
- ng generate component component-name
10
+ npm i @pykara/pykara-chat
11
11
  ```
12
12
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
13
+ ---
14
14
 
15
- ```bash
16
- ng generate --help
17
- ```
18
-
19
- ## Building
15
+ ## What this package provides
20
16
 
21
- To build the library, run:
17
+ ### Component
18
+ - **Class name (import name):** `ChatWidget`
19
+ - **HTML selector (tag):** `<lib-chat-widget></lib-chat-widget>`
22
20
 
23
- ```bash
24
- ng build pykara-chat
25
- ```
21
+ ---
26
22
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
23
+ ## Usage in Angular
28
24
 
29
- ### Publishing the Library
25
+ ## Option 1: Module-based Angular project (AppModule)
30
26
 
31
- Once the project is built, you can publish your library by following these steps:
27
+ If your project has `app.module.ts`:
32
28
 
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/pykara-chat
36
- ```
29
+ ### 1) Import the component in `app.module.ts`
37
30
 
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
31
+ ```ts
32
+ import { BrowserModule } from '@angular/platform-browser';
33
+ import { NgModule } from '@angular/core';
42
34
 
43
- ## Running unit tests
35
+ import { AppRoutingModule } from './app-routing.module';
36
+ import { App } from './app';
44
37
 
45
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
38
+ import { ChatWidget } from '@pykara/pykara-chat';
46
39
 
47
- ```bash
48
- ng test
40
+ @NgModule({
41
+ declarations: [App],
42
+ imports: [
43
+ BrowserModule,
44
+ AppRoutingModule,
45
+ ChatWidget
46
+ ],
47
+ providers: [],
48
+ bootstrap: [App]
49
+ })
50
+ export class AppModule {}
49
51
  ```
50
52
 
51
- ## Running end-to-end tests
53
+ ### 2) Use it in HTML
52
54
 
53
- For end-to-end (e2e) testing, run:
55
+ Example: `src/app/app.html` or `app.component.html`
54
56
 
55
- ```bash
56
- ng e2e
57
+ ```html
58
+ <lib-chat-widget></lib-chat-widget>
57
59
  ```
58
60
 
59
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61
+ ---
60
62
 
61
- ## Additional Resources
63
+ ## Option 2: Standalone Angular project (no AppModule)
62
64
 
63
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
65
+ ```ts
66
+ import { Component } from '@angular/core';
67
+ import { ChatWidget } from '@pykara/pykara-chat';
68
+
69
+ @Component({
70
+ selector: 'app-root',
71
+ standalone: true,
72
+ imports: [ChatWidget],
73
+ template: `<lib-chat-widget></lib-chat-widget>`
74
+ })
75
+ export class App {}
76
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pykara/pykara-chat",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.3.0",
6
6
  "@angular/core": "^20.3.0"