@leverege/build-tools 2.58.5 → 2.58.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.58.5",
3
+ "version": "2.58.6",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -81,7 +81,7 @@
81
81
  "readline-sync": "^1.4.10",
82
82
  "semver": "^7.6.3",
83
83
  "simple-git": "^3.27.0",
84
- "zx": "^8.2.4"
84
+ "zx": "^8.3.0"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@leverege/eslint-config-leverege": "^5.0.1",
package/src/Utils.mjs CHANGED
@@ -477,7 +477,7 @@ export const analyzeRepository = async ( giveGuidance ) => {
477
477
  await shellCmd( 'npm run build' )
478
478
  }
479
479
 
480
- const buildToolsVersion = closestPackageJson.devDependencies['@leverege/build-tools']
480
+ const buildToolsVersion = closestPackageJson.devDependencies['@leverege/build-tools'] || closestPackageJson.dependencies['@leverege/build-tools']
481
481
  if ( !buildToolsVersion ) {
482
482
  errorExit( 'Error: missing devDependency for @leverege/build-tools in package.json' )
483
483
  }
package/src/circleate.sh CHANGED
@@ -347,7 +347,7 @@ jobs:
347
347
  at: ~/project
348
348
  - run:
349
349
  name: Generate docs
350
- command: npx jsdoc -r src -R README.md -d docs
350
+ command: npm run docs
351
351
  - store_artifacts:
352
352
  path: docs
353
353
  prefix: docs
@@ -17,7 +17,6 @@
17
17
  }
18
18
  },
19
19
  "opts": {
20
- "template": "node_modules/@leverege/jsdoc-template",
21
20
  "encoding": "utf8",
22
21
  "lenient": false,
23
22
  "markdown": true
@@ -19,6 +19,12 @@ import {
19
19
 
20
20
  const jsdocConfig = `${BUILD_TOOLS_ROOT}/generate-docs-conf.json`
21
21
 
22
+ // build the location of the template file from the build-tools root
23
+ // in order to avoid hardcoding in the jsdoc config file - this is
24
+ // important in order to support running generate-docs from a user's
25
+ // laptop or deployed to the doc-creator service on k8s
26
+ const jsdocTemplate = `${BUILD_TOOLS_ROOT}/../../jsdoc-template`
27
+
22
28
  if ( !fs.existsSync( jsdocConfig ) ) { // eslint-disable-line security/detect-non-literal-fs-filename
23
29
  err( `cannot find the jsdoc config file: ${jsdocConfig}` )
24
30
  process.exit( 1 )
@@ -35,7 +41,7 @@ if ( fs.existsSync( 'docs' ) ) {
35
41
  fs.mkdirSync( 'docs/md', { recursive : true } )
36
42
 
37
43
  try {
38
- await shellCmd( `npx --yes jsdoc -c ${jsdocConfig} -R README.md -d docs src` )
44
+ await shellCmd( `npx --yes jsdoc -c ${jsdocConfig} -t ${jsdocTemplate} -R README.md -d docs src` )
39
45
  await shellCmd(
40
46
  `npx --yes --package=jsdoc-to-markdown jsdoc2md --files src/*.js --configure ${jsdocConfig}`,
41
47
  { stdout : { file : 'docs/md/API.md' } }