@leverege/build-tools 2.58.4 → 2.58.5
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/package.json +2 -2
- package/src/circleate.sh +1 -1
- package/src/generate-docs-conf.json +7 -5
- package/src/generate-docs.mjs +25 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.58.
|
|
3
|
+
"version": "2.58.5",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@google-cloud/artifact-registry": "^3.5.0",
|
|
63
63
|
"@leverege/jsdoc-template": "^1.0.1",
|
|
64
64
|
"ansi-colors": "^4.1.3",
|
|
65
|
-
"chalk": "^5.4.
|
|
65
|
+
"chalk": "^5.4.1",
|
|
66
66
|
"command-line-args": "^6.0.1",
|
|
67
67
|
"command-line-usage": "^7.0.3",
|
|
68
68
|
"deepmerge": "^4.3.1",
|
package/src/circleate.sh
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"templates": {
|
|
11
11
|
"cleverLinks": true,
|
|
12
12
|
"monospaceLinks": false,
|
|
13
|
+
"preserveDescriptions": true,
|
|
13
14
|
"default": {
|
|
14
15
|
"useLongnameInNav": true,
|
|
15
16
|
"outputSourceFiles": false
|
|
@@ -18,7 +19,8 @@
|
|
|
18
19
|
"opts": {
|
|
19
20
|
"template": "node_modules/@leverege/jsdoc-template",
|
|
20
21
|
"encoding": "utf8",
|
|
21
|
-
"lenient": false
|
|
22
|
+
"lenient": false,
|
|
23
|
+
"markdown": true
|
|
22
24
|
},
|
|
23
25
|
"docdash": {
|
|
24
26
|
"static": true,
|
|
@@ -30,10 +32,10 @@
|
|
|
30
32
|
"scripts": [],
|
|
31
33
|
"menu":{
|
|
32
34
|
"Bitbucket": {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
"href":"https://bitbucket.org/leverege/IF_THIS_MAKES_SENSE",
|
|
36
|
+
"target":"_blank",
|
|
37
|
+
"class":"menu-item",
|
|
38
|
+
"id":"repository"
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
}
|
package/src/generate-docs.mjs
CHANGED
|
@@ -7,23 +7,39 @@
|
|
|
7
7
|
* npx --package=jsdoc-to-markdown jsdoc2md --files src/*.js --configure ./jsdoc.json > docs/md/API.md
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
+
import fs from 'node:fs'
|
|
11
|
+
|
|
10
12
|
import {
|
|
11
|
-
|
|
13
|
+
BUILD_TOOLS_ROOT,
|
|
12
14
|
debug,
|
|
15
|
+
err,
|
|
13
16
|
getRepositoryDescr,
|
|
14
|
-
getSourceTop,
|
|
15
|
-
log,
|
|
16
17
|
shellCmd,
|
|
17
18
|
} from './Utils.mjs'
|
|
18
19
|
|
|
20
|
+
const jsdocConfig = `${BUILD_TOOLS_ROOT}/generate-docs-conf.json`
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
if ( !fs.existsSync( jsdocConfig ) ) { // eslint-disable-line security/detect-non-literal-fs-filename
|
|
23
|
+
err( `cannot find the jsdoc config file: ${jsdocConfig}` )
|
|
24
|
+
process.exit( 1 )
|
|
25
|
+
}
|
|
22
26
|
|
|
23
27
|
const repoDescr = await getRepositoryDescr()
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
debug( { jsdocConfig, repoDescr }, '<==The Repo' )
|
|
30
|
+
|
|
31
|
+
// blow away any existing docs before recreating the docs dir
|
|
32
|
+
if ( fs.existsSync( 'docs' ) ) {
|
|
33
|
+
fs.rmSync( 'docs', { recursive : true } )
|
|
34
|
+
}
|
|
35
|
+
fs.mkdirSync( 'docs/md', { recursive : true } )
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
await shellCmd(
|
|
29
|
-
await shellCmd(
|
|
37
|
+
try {
|
|
38
|
+
await shellCmd( `npx --yes jsdoc -c ${jsdocConfig} -R README.md -d docs src` )
|
|
39
|
+
await shellCmd(
|
|
40
|
+
`npx --yes --package=jsdoc-to-markdown jsdoc2md --files src/*.js --configure ${jsdocConfig}`,
|
|
41
|
+
{ stdout : { file : 'docs/md/API.md' } }
|
|
42
|
+
)
|
|
43
|
+
} catch ( error ) {
|
|
44
|
+
err( error )
|
|
45
|
+
}
|