@dataclouder/ngx-lessons 0.0.32 → 0.0.33

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 CHANGED
@@ -1,27 +1,73 @@
1
- # Lessons
1
+ # @dataclouder/ngx-lessons
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
3
+ This Angular library provides a set of components and services for building dynamic, interactive language learning lessons within the Polilan application ecosystem. It leverages PrimeNG components for UI elements and follows modern Angular practices (Signals, standalone components).
4
4
 
5
- using the code
6
- ng generate library @dataclouder/ngx-lessons --prefix=dc
5
+ ## Installation
7
6
 
8
- ## Code scaffolding
7
+ To install this library in your Angular project, run:
9
8
 
10
- Run `ng generate component component-name --project lessons` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project lessons`.
9
+ ```bash
10
+ npm install @dataclouder/ngx-lessons
11
+ ```
11
12
 
12
- > Note: Don't forget to add `--project lessons` or else it will be added to the default project in your `angular.json` file.
13
+ or
14
+
15
+ ```bash
16
+ yarn add @dataclouder/ngx-lessons
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Import the necessary components or services into your Angular standalone components or modules.
22
+
23
+ **Example (Standalone Component):**
24
+
25
+ ```typescript
26
+ import { Component } from '@angular/core';
27
+ // Assuming a primary component like LessonDisplayComponent exists and is exported
28
+ import { LessonDisplayComponent } from '@dataclouder/ngx-lessons';
29
+
30
+ @Component({
31
+ selector: 'app-my-lesson-page',
32
+ standalone: true,
33
+ imports: [LessonDisplayComponent], // Import the lesson component
34
+ template: `
35
+ <h2>My Lesson</h2>
36
+ <dc-lesson-display [lessonId]="currentLessonId"></dc-lesson-display>
37
+ `,
38
+ })
39
+ export class MyLessonPageComponent {
40
+ currentLessonId = 'lesson-1';
41
+ // ... component logic
42
+ }
43
+ ```
44
+
45
+ _(Note: Replace `LessonDisplayComponent` and `dc-lesson-display` with the actual primary component exported by the library if different.)_
46
+
47
+ ## Key Features
48
+
49
+ - **Dynamic Lesson Rendering:** Renders different types of lesson interactions based on configuration.
50
+ - **Component Builder:** Facilitates the creation and configuration of lesson components.
51
+ - **Core Interfaces:** Provides `ILesson`, `LessonComponentConfiguration`, etc., for defining lesson structures.
52
+ - **PrimeNG Integration:** Uses PrimeNG components for a consistent UI.
53
+
54
+ ## Code Scaffolding (Development within this library)
55
+
56
+ Run `ng generate component component-name --project @dataclouder/ngx-lessons` to generate a new component within this library project. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project @dataclouder/ngx-lessons`.
57
+
58
+ > Note: Don't forget to add `--project @dataclouder/ngx-lessons` or else it will be added to the default project in your `angular.json` file.
13
59
 
14
60
  ## Build
15
61
 
16
- Run `ng build lessons` to build the project. The build artifacts will be stored in the `dist/` directory.
62
+ Run `ng build @dataclouder/ngx-lessons` to build the project. The build artifacts will be stored in the `dist/dataclouder/ngx-lessons` directory.
17
63
 
18
64
  ## Publishing
19
65
 
20
- After building your library with `ng build lessons`, go to the dist folder `cd dist/lessons` and run `npm publish`.
66
+ After building your library with `ng build @dataclouder/ngx-lessons`, go to the dist folder `cd dist/dataclouder/ngx-lessons` and run `npm publish`.
21
67
 
22
68
  ## Running unit tests
23
69
 
24
- Run `ng test lessons` to execute the unit tests via [Karma](https://karma-runner.github.io).
70
+ Run `ng test @dataclouder/ngx-lessons` to execute the unit tests via Jest.
25
71
 
26
72
  ## Further help
27
73