@twobirds/microcomponents 0.2.5 → 0.3.0
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 +14 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -38,6 +38,20 @@ Check the [typedoc API reference](https://twobirds.gitlab.io/microcomponents/typ
|
|
|
38
38
|
|
|
39
39
|
The progress of coding is occasionally being streamed on [twitch](https://twitch.tv/frankieth).
|
|
40
40
|
|
|
41
|
+
## MCP Server
|
|
42
|
+
|
|
43
|
+
An MCP (Model Context Protocol) server ships with this repo so AI assistants can look the library up instead of answering from memory: `microcomponents-mcp-server.ts` at the repo root.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pnpm run mcp:run # start the server on stdio
|
|
47
|
+
pnpm run mcp:dev # restart it whenever src/ changes
|
|
48
|
+
pnpm run mcp:docs # regenerate docs/api.json and report undocumented exports
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Tools: `list-components`, `get-component-docs`, `search-components`, `get-core-concept`, `get-source-file`, `list-undocumented`.
|
|
52
|
+
|
|
53
|
+
There is no hand-written API list in the server. The whole index is extracted at startup from the JSDoc blocks of the public exports (the names re-exported by each `src/*/index.ts`), so it can never drift away from the code it documents — and `list-undocumented` tells you when a source file still lacks a doc block. Concept essays are hand-authored markdown, one file per concept under `docs/concepts/`, which is also where the tool's list of available concepts comes from.
|
|
54
|
+
|
|
41
55
|
## Examples
|
|
42
56
|
|
|
43
57
|
### **Functional Principle**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twobirds/microcomponents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Micro Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"custom elements",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"doc": "vite preview --outDir public/typedoc --port 11000 --host",
|
|
89
89
|
"watch": "tsx watch.ts",
|
|
90
90
|
"mcp:dev": "tsx watch microcomponents-mcp-server.ts",
|
|
91
|
+
"mcp:docs": "node mcp-docs-generate.ts",
|
|
91
92
|
"mcp:run": "tsx microcomponents-mcp-server.ts",
|
|
92
93
|
"prepublishOnly": "pnpm run build && pnpm run check"
|
|
93
94
|
},
|