@opensyntaxhq/autodocs-plugin-examples 1.0.0 → 2.0.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 +36 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +6 -6
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @opensyntaxhq/autodocs-plugin-examples
|
|
2
|
+
|
|
3
|
+
Code example validation and extraction plugin for Autodocs.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -D @opensyntaxhq/autodocs-plugin-examples
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { defineConfig } from '@opensyntaxhq/autodocs';
|
|
15
|
+
|
|
16
|
+
export default defineConfig({
|
|
17
|
+
plugins: [
|
|
18
|
+
{
|
|
19
|
+
name: '@opensyntaxhq/autodocs-plugin-examples',
|
|
20
|
+
options: {
|
|
21
|
+
validate: true,
|
|
22
|
+
outputDir: 'examples',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Options
|
|
30
|
+
|
|
31
|
+
- `validate` (boolean, optional): type-check examples (default `false`).
|
|
32
|
+
- `outputDir` (string, optional): directory (relative to output) for extracted examples.
|
|
33
|
+
|
|
34
|
+
## Output
|
|
35
|
+
|
|
36
|
+
When `outputDir` is set, the plugin writes `examples.json` plus individual example files.
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var import_promises = __toESM(require("fs/promises"));
|
|
|
64
64
|
var import_path4 = __toESM(require("path"));
|
|
65
65
|
|
|
66
66
|
// ../../core/src/version.ts
|
|
67
|
-
var VERSION = "
|
|
67
|
+
var VERSION = "2.0.0";
|
|
68
68
|
|
|
69
69
|
// ../../core/src/generators/markdown/index.ts
|
|
70
70
|
var import_promises2 = __toESM(require("fs/promises"));
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensyntaxhq/autodocs-plugin-examples",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Code example validation and extraction plugin for Autodocs",
|
|
6
6
|
"repository": {
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"clean": "rm -rf dist"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"typescript": "^5.9.
|
|
45
|
+
"typescript": "^5.9.3"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@opensyntaxhq/autodocs-core": "^
|
|
48
|
+
"@opensyntaxhq/autodocs-core": "^2.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@opensyntaxhq/autodocs-core": "^
|
|
52
|
-
"@types/node": "^
|
|
53
|
-
"tsup": "^8.
|
|
51
|
+
"@opensyntaxhq/autodocs-core": "^2.0.0",
|
|
52
|
+
"@types/node": "^25.2.2",
|
|
53
|
+
"tsup": "^8.5.1"
|
|
54
54
|
}
|
|
55
55
|
}
|