@ui-context/parser-angular 0.1.2 → 0.1.4
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 +47 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @ui-context/parser-angular
|
|
2
|
+
|
|
3
|
+
Angular component parser for [ui-context](https://github.com/oluizcarvalho/ui-context). Extracts component metadata from Angular source files using [ts-morph](https://github.com/dsherret/ts-morph).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ui-context/parser-angular
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { createParser } from "@ui-context/parser-angular";
|
|
15
|
+
|
|
16
|
+
const parser = createParser();
|
|
17
|
+
const components = await parser.parse({
|
|
18
|
+
sourcePath: "./src/components",
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What it extracts
|
|
23
|
+
|
|
24
|
+
- **Inputs** from `@Input()` decorators and Angular 14+ `input()` signal API
|
|
25
|
+
- **Outputs** from `@Output()` decorators and `output()` signal API
|
|
26
|
+
- **Public methods** (excluding lifecycle hooks and private methods)
|
|
27
|
+
- **Slots** from `<ng-content>` in component templates
|
|
28
|
+
- **Examples** from `.stories.ts` files and spec templates
|
|
29
|
+
- **Component metadata** — name, selector, description
|
|
30
|
+
|
|
31
|
+
## Supported decorators
|
|
32
|
+
|
|
33
|
+
`@Component`, `@Directive`, `@Input`, `@Output`
|
|
34
|
+
|
|
35
|
+
## Default ignore patterns
|
|
36
|
+
|
|
37
|
+
`**/*.spec.ts`, `**/*.module.ts`, `**/*.routing.ts`
|
|
38
|
+
|
|
39
|
+
## Links
|
|
40
|
+
|
|
41
|
+
- [Documentation](https://oluizcarvalho.github.io/ui-context/)
|
|
42
|
+
- [GitHub](https://github.com/oluizcarvalho/ui-context/tree/main/packages/parser-angular)
|
|
43
|
+
- [All packages](https://www.npmjs.com/org/ui-context)
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui-context/parser-angular",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Angular component parser for ui-context",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"build": "tsc --build"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ui-context/core": "0.1.
|
|
14
|
+
"@ui-context/core": "0.1.4",
|
|
15
15
|
"ts-morph": "^22.0.0",
|
|
16
16
|
"glob": "^10.3.0"
|
|
17
17
|
},
|