@leverege/build-tools 2.58.1 → 2.58.2
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 +3 -3
- package/src/Docker.mjs +11 -4
- package/src/generate-docs-conf.json +40 -0
- package/src/generate-docs.mjs +61 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.58.
|
|
3
|
+
"version": "2.58.2",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"command-line-usage": "^7.0.3",
|
|
66
66
|
"deepmerge": "^4.3.1",
|
|
67
67
|
"enquirer": "^2.4.1",
|
|
68
|
-
"execa": "^9.5.
|
|
68
|
+
"execa": "^9.5.2",
|
|
69
69
|
"glob": "^11.0.0",
|
|
70
70
|
"handlebars": "^4.7.8",
|
|
71
|
-
"inquirer": "^12.
|
|
71
|
+
"inquirer": "^12.2.0",
|
|
72
72
|
"js-yaml": "^4.1.0",
|
|
73
73
|
"ms": "^2.1.3",
|
|
74
74
|
"npm-registry-fetch": "^18.0.2",
|
package/src/Docker.mjs
CHANGED
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
warning
|
|
14
14
|
} from './Utils.mjs'
|
|
15
15
|
|
|
16
|
+
// TODO: change default to node 22 (jod) after 01/01/25
|
|
17
|
+
const dockerfileNodeVersion = process.env.USE_NODEJS_22 ? 'jod-alpine' : 'iron-alpine'
|
|
18
|
+
|
|
16
19
|
// The contents of these variables were initially located in files that live in
|
|
17
20
|
// the build-tools repository, but it just became simpler to pull the contents
|
|
18
21
|
// directly into these variables and forego the file loading.
|
|
@@ -187,7 +190,11 @@ const generateDockerfile = ( options ) => {
|
|
|
187
190
|
|
|
188
191
|
const settings = { ...defaultSettings, ...options }
|
|
189
192
|
|
|
190
|
-
|
|
193
|
+
// defaults to the current "official" version of node unless it gets
|
|
194
|
+
// overridden in the leverege.nodeimg package.json stanza
|
|
195
|
+
if ( !settings.nodeimage ) {
|
|
196
|
+
settings.nodeimage = dockerfileNodeVersion
|
|
197
|
+
}
|
|
191
198
|
|
|
192
199
|
// Ensure the presence of the docker dir with plugin and bashrc - this code
|
|
193
200
|
// could probably be tightened up a little.
|
|
@@ -227,14 +234,14 @@ const generateDockerfile = ( options ) => {
|
|
|
227
234
|
|
|
228
235
|
// At this point the plugin template better exist.
|
|
229
236
|
if ( fs.existsSync( dockerfilePlugin ) ) {
|
|
230
|
-
|
|
237
|
+
settings.pluginfile = fs.readFileSync( dockerfilePlugin )
|
|
231
238
|
} else {
|
|
232
239
|
errorExit( `***ERROR: something went wrong with ${dockerfilePlugin} plugin creation` )
|
|
233
240
|
}
|
|
234
241
|
|
|
235
242
|
const dockerfilePrePlugin = './docker/DockerfilePreInstall.plugin'
|
|
236
243
|
if ( fs.existsSync( dockerfilePrePlugin ) ) {
|
|
237
|
-
|
|
244
|
+
settings.preInstallPluginfile = fs.readFileSync( dockerfilePrePlugin )
|
|
238
245
|
}
|
|
239
246
|
|
|
240
247
|
const compiled = handlebars.compile( dockerfileTemplate, { noEscape : true } )
|
|
@@ -249,7 +256,7 @@ const generateDockerfile = ( options ) => {
|
|
|
249
256
|
}
|
|
250
257
|
|
|
251
258
|
const previousBuild = getPreviousBuild()
|
|
252
|
-
const dockerInfo = { dockerfile, previousBuild, ...
|
|
259
|
+
const dockerInfo = { dockerfile, previousBuild, ...settings }
|
|
253
260
|
delete dockerInfo.pluginfile
|
|
254
261
|
return dockerInfo
|
|
255
262
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tags": {
|
|
3
|
+
"allowUnknownTags": false
|
|
4
|
+
},
|
|
5
|
+
"source": {
|
|
6
|
+
"includePattern": "\\.(js|mjs|jsx)$",
|
|
7
|
+
"excludePattern": "(node_modules/|docs)"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [],
|
|
10
|
+
"templates": {
|
|
11
|
+
"cleverLinks": true,
|
|
12
|
+
"monospaceLinks": false,
|
|
13
|
+
"default": {
|
|
14
|
+
"useLongnameInNav": true,
|
|
15
|
+
"outputSourceFiles": false
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"opts": {
|
|
19
|
+
"template": "node_modules/@leverege/jsdoc-template",
|
|
20
|
+
"encoding": "utf8",
|
|
21
|
+
"lenient": false
|
|
22
|
+
},
|
|
23
|
+
"docdash": {
|
|
24
|
+
"static": true,
|
|
25
|
+
"sort": false,
|
|
26
|
+
"search": true,
|
|
27
|
+
"collapse": true,
|
|
28
|
+
"typedefs": true,
|
|
29
|
+
"removeQuotes": "none",
|
|
30
|
+
"scripts": [],
|
|
31
|
+
"menu":{
|
|
32
|
+
"Bitbucket": {
|
|
33
|
+
"href":"https://bitbucket.org/leverege/IF_THIS_MAKES_SENSE",
|
|
34
|
+
"target":"_blank",
|
|
35
|
+
"class":"menu-item",
|
|
36
|
+
"id":"repository"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* Encapsulates the rather lengthy jsdoc / md docs npm script:
|
|
4
|
+
*
|
|
5
|
+
* npx jsdoc -c ./jsdoc.json -R README.md -d docs src && \
|
|
6
|
+
* mkdir -p docs/md && \
|
|
7
|
+
* npx --package=jsdoc-to-markdown jsdoc2md --files src/*.js --configure ./jsdoc.json > docs/md/API.md
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import {
|
|
11
|
+
condir,
|
|
12
|
+
debug,
|
|
13
|
+
getRepositoryDescr,
|
|
14
|
+
log,
|
|
15
|
+
shellCmd,
|
|
16
|
+
} from './Utils.mjs'
|
|
17
|
+
|
|
18
|
+
const jsdocConfig = `{
|
|
19
|
+
"tags": {
|
|
20
|
+
"allowUnknownTags": false
|
|
21
|
+
},
|
|
22
|
+
"source": {
|
|
23
|
+
"includePattern": "\\.(js|mjs|jsx)$",
|
|
24
|
+
"excludePattern": "(node_modules/|docs)"
|
|
25
|
+
},
|
|
26
|
+
"plugins": [],
|
|
27
|
+
"templates": {
|
|
28
|
+
"cleverLinks": true,
|
|
29
|
+
"monospaceLinks": false,
|
|
30
|
+
"default": {
|
|
31
|
+
"useLongnameInNav": true,
|
|
32
|
+
"outputSourceFiles": false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"opts": {
|
|
36
|
+
"template": "node_modules/@leverege/jsdoc-template",
|
|
37
|
+
"encoding": "utf8",
|
|
38
|
+
"lenient": false
|
|
39
|
+
},
|
|
40
|
+
"docdash": {
|
|
41
|
+
"static": true,
|
|
42
|
+
"sort": false,
|
|
43
|
+
"search": true,
|
|
44
|
+
"collapse": true,
|
|
45
|
+
"typedefs": true,
|
|
46
|
+
"removeQuotes": "none",
|
|
47
|
+
"scripts": [],
|
|
48
|
+
"menu":{
|
|
49
|
+
"Bitbucket": {
|
|
50
|
+
"href":"https://bitbucket.org/leverege/IF_THIS_MAKES_SENSE",
|
|
51
|
+
"target":"_blank",
|
|
52
|
+
"class":"menu-item",
|
|
53
|
+
"id":"repository"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}`
|
|
58
|
+
|
|
59
|
+
const repoDescr = await getRepositoryDescr()
|
|
60
|
+
|
|
61
|
+
condir( { jsdocConfig, repoDescr }, '<==The Repo' )
|