@wordpress/docgen 2.53.0 → 2.55.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 +5 -5
- package/lib/index.js +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm install @wordpress/docgen --save-dev
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
npm exec --no -- docgen <entry-point.js>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
This command will generate a file named `entry-point-api.md` containing all the exports and their JSDoc comments.
|
|
@@ -66,7 +66,7 @@ export default function addition( term1, term2 ) {
|
|
|
66
66
|
}
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Output of `
|
|
69
|
+
Output of `npm exec --no -- docgen index.js` would be `index-api.js`:
|
|
70
70
|
|
|
71
71
|
```markdown
|
|
72
72
|
# API
|
|
@@ -119,7 +119,7 @@ function count( term1, term2 ) {
|
|
|
119
119
|
export { count, addition };
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
Output of `
|
|
122
|
+
Output of `npm exec --no -- docgen index.js` would be `index-api.js`:
|
|
123
123
|
|
|
124
124
|
```markdown
|
|
125
125
|
# API
|
|
@@ -206,7 +206,7 @@ export function addition( term1, term2 ) {
|
|
|
206
206
|
}
|
|
207
207
|
````
|
|
208
208
|
|
|
209
|
-
Output of `
|
|
209
|
+
Output of `npm exec --no -- docgen index.js` would be `index-api.js`:
|
|
210
210
|
|
|
211
211
|
````markdown
|
|
212
212
|
# API
|
|
@@ -273,7 +273,7 @@ export default function addition( term1: number, term2: number ): number {
|
|
|
273
273
|
}
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
-
Output of `
|
|
276
|
+
Output of `npm exec --no -- docgen index.ts` would be `index-api.js`:
|
|
277
277
|
|
|
278
278
|
```markdown
|
|
279
279
|
# API
|
package/lib/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const isSymbolIgnore = require( './is-symbol-ignore' );
|
|
|
8
8
|
/**
|
|
9
9
|
* Helpers functions.
|
|
10
10
|
*/
|
|
11
|
-
const extensions = [ '.js', '.ts', '.tsx' ];
|
|
11
|
+
const extensions = [ '.js', '.jsx', '.ts', '.tsx' ];
|
|
12
12
|
const relativeToAbsolute = ( basePath, relativePath ) => {
|
|
13
13
|
const target = path.join( path.dirname( basePath ), relativePath );
|
|
14
14
|
const extension = path.extname( target );
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/docgen",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.55.0",
|
|
4
4
|
"description": "Autogenerate public API documentation from exports and JSDoc comments.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -43,10 +43,11 @@
|
|
|
43
43
|
"unified": "^7.1.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@types/babel__core": "^7.20.5"
|
|
46
|
+
"@types/babel__core": "^7.20.5",
|
|
47
|
+
"vitest": "^5.0.0"
|
|
47
48
|
},
|
|
48
49
|
"publishConfig": {
|
|
49
50
|
"access": "public"
|
|
50
51
|
},
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "485f42ae8a1c58ceea18371a507fd4acfa86fbd8"
|
|
52
53
|
}
|