js-build-tools 6.2.2 → 6.3.1
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 +180 -9
- package/dist/build.js +66 -66
- package/dist/bundle.js +1 -1
- package/dist/docs.js +11 -11
- package/dist/partials/jsdocDocsFor.js +133 -113
- package/dist/partials/loadPlaywright.js +34 -0
- package/dist/partials/neostandardLint.js +5 -3
- package/dist/partials/resolveDocsMethod.js +12 -12
- package/dist/partials/serveStatic.js +57 -0
- package/dist/partials/tsFor.js +2 -2
- package/dist/partials/typeDocsFor.js +28 -22
- package/dist/partials.js +169 -149
- package/dist/partials.min.js +1 -1
- package/dist/test-helpers/setUp.js +6 -0
- package/dist/utilities/convertMjsFilesForDocs.js +1 -0
- package/dist/utilities/dotGet.js +1 -0
- package/dist/utilities/dotNotate.js +5 -0
- package/dist/utilities/dotSet.js +1 -0
- package/dist/utilities/esmNamedExportsToCjs.js +1 -0
- package/dist/utilities/getBundleConfigs.js +1 -0
- package/dist/utilities/isObject.js +1 -0
- package/dist/utilities/strAfter.js +1 -0
- package/dist/utilities/strBefore.js +1 -0
- package/functions/bundle.mjs +1 -1
- package/functions/jsdocEsmExports.test.mjs +24 -0
- package/functions/partials/jsdocDocsFor.mjs +33 -13
- package/functions/partials/jsdocDocsFor.test.mjs +51 -0
- package/functions/partials/loadPlaywright.mjs +23 -0
- package/functions/partials/loadPlaywright.test.mjs +71 -0
- package/functions/partials/neostandardLint.mjs +5 -3
- package/functions/partials/serveStatic.mjs +47 -0
- package/functions/partials/serveStatic.test.mjs +71 -0
- package/functions/partials/tsFor.mjs +2 -2
- package/functions/partials/typeDocsFor.mjs +24 -20
- package/functions/partials/typeDocsFor.test.mjs +23 -0
- package/functions/partials.mjs +2 -0
- package/functions/partials.test.mjs +1 -1
- package/functions/test-helpers/setUp.mjs +6 -0
- package/functions/utilities/convertMjsFilesForDocs.mjs +1 -0
- package/functions/utilities/dotGet.mjs +1 -0
- package/functions/utilities/dotNotate.mjs +5 -0
- package/functions/utilities/dotSet.mjs +1 -0
- package/functions/utilities/esmNamedExportsToCjs.mjs +1 -0
- package/functions/utilities/getBundleConfigs.mjs +1 -0
- package/functions/utilities/isObject.mjs +1 -0
- package/functions/utilities/strAfter.mjs +1 -0
- package/functions/utilities/strBefore.mjs +1 -0
- package/gulp.config.mjs +2 -2
- package/gulpfile.base.mjs +1 -3
- package/jsdoc.base.js +9 -3
- package/jsdoc.esmExports.js +17 -0
- package/package.json +16 -10
package/jsdoc.base.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
const path = require('path')
|
|
1
2
|
const gulpConfig = require('./gulp.config.js')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
|
-
plugins: ['plugins/markdown'],
|
|
5
|
+
plugins: ['plugins/markdown', path.join(__dirname, 'jsdoc.esmExports.js')],
|
|
6
|
+
// Give markdown headings ids (the README / docs.index front page), so they can be linked to and a theme's
|
|
7
|
+
// table of contents can follow them
|
|
8
|
+
markdown: { idInHeadings: true },
|
|
5
9
|
source: {
|
|
6
10
|
include: [gulpConfig.get('dist.to')],
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
// .mjs / .cjs too, so ES module source can be documented as it is, not only its compiled CommonJS
|
|
12
|
+
includePattern: '.+\\.[cm]?js(doc|x)?$',
|
|
13
|
+
// Files starting with _, tests, and minified copies (which only repeat what their unminified file documents)
|
|
14
|
+
excludePattern: '((^|\\/|\\\\)_|.+\\.test\\..*|.+\\.min\\.[cm]?js$)'
|
|
9
15
|
},
|
|
10
16
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A jsdoc plugin for ES module source. When a file has no @module tag of its own, jsdoc names each
|
|
3
|
+
* `export const x` it documents `exports.x`, so with `@memberOf module:name` it becomes `module:name.exports.x`
|
|
4
|
+
* (shown as "exports.x"). This drops that `exports.` so it is `module:name.x`, the name it is used by.
|
|
5
|
+
*/
|
|
6
|
+
const prefix = 'exports.'
|
|
7
|
+
|
|
8
|
+
exports.handlers = {
|
|
9
|
+
newDoclet ({ doclet }) {
|
|
10
|
+
if (doclet.name && doclet.name.startsWith(prefix)) {
|
|
11
|
+
doclet.name = doclet.name.slice(prefix.length)
|
|
12
|
+
}
|
|
13
|
+
if (doclet.longname && doclet.longname.includes(`.${prefix}`)) {
|
|
14
|
+
doclet.longname = doclet.longname.replace(`.${prefix}`, '.')
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-build-tools",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.1",
|
|
4
4
|
"description": "Standardised build process with gulp.",
|
|
5
5
|
"main": "gulpfile.base.js",
|
|
6
6
|
"exports": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "gulp build",
|
|
22
22
|
"dev": "gulp",
|
|
23
|
-
"
|
|
23
|
+
"docs": "gulp docs",
|
|
24
24
|
"readme": "gulp readme",
|
|
25
25
|
"release": "release-it",
|
|
26
26
|
"release:dry-run": "release-it --dry-run",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"autoprefixer": "^10.6.1",
|
|
57
57
|
"babel-jest": "^30.5.2",
|
|
58
58
|
"browserify": "^17.0.1",
|
|
59
|
-
"core-js": "^3.
|
|
59
|
+
"core-js": "^3.51.0",
|
|
60
60
|
"cssnano": "^6.1.2",
|
|
61
|
-
"eslint": "^10.
|
|
61
|
+
"eslint": "^10.13.0",
|
|
62
62
|
"glob": "^13.0.6",
|
|
63
63
|
"gulp": "^5.0.1",
|
|
64
64
|
"gulp-babel": "^8.1.0",
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
"gulp-postcss": "^10.0.0",
|
|
67
67
|
"gulp-rename": "^2.1.0",
|
|
68
68
|
"gulp-sass": "^6.0.1",
|
|
69
|
-
"gulp-ts-compile": "^1.0.
|
|
69
|
+
"gulp-ts-compile": "^1.0.2",
|
|
70
70
|
"gulp-uglify-es": "^3.0.0",
|
|
71
71
|
"jest": "^30.5.2",
|
|
72
72
|
"jest-environment-jsdom": "^30.5.2",
|
|
73
73
|
"jsdoc-to-markdown": "^9.1.3",
|
|
74
74
|
"merge-stream": "^2.0.0",
|
|
75
75
|
"neostandard": "^0.14.1",
|
|
76
|
-
"postcss": "^8.5.
|
|
76
|
+
"postcss": "^8.5.31",
|
|
77
77
|
"regenerator-runtime": "^0.14.1",
|
|
78
|
-
"sass": "^1.105.
|
|
79
|
-
"test-filesystem": "^2.0.
|
|
78
|
+
"sass": "^1.105.2",
|
|
79
|
+
"test-filesystem": "^2.0.2",
|
|
80
80
|
"through2": "^4.0.2",
|
|
81
81
|
"vinyl-source-stream": "^2.0.0"
|
|
82
82
|
},
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"clean-jsdoc-theme": ">=4.0.0",
|
|
85
85
|
"gulp-imagemin": ">=9.0.0",
|
|
86
86
|
"jsdoc": ">=4.0.0",
|
|
87
|
+
"playwright": ">=1.40.0",
|
|
87
88
|
"typedoc": ">=0.28.0",
|
|
88
89
|
"typescript": ">=5.0.0 <7.0.0"
|
|
89
90
|
},
|
|
@@ -97,6 +98,9 @@
|
|
|
97
98
|
"jsdoc": {
|
|
98
99
|
"optional": true
|
|
99
100
|
},
|
|
101
|
+
"playwright": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
100
104
|
"typedoc": {
|
|
101
105
|
"optional": true
|
|
102
106
|
},
|
|
@@ -112,13 +116,15 @@
|
|
|
112
116
|
"gulpfile.base.mjs",
|
|
113
117
|
"gulp.config.js",
|
|
114
118
|
"gulp.config.mjs",
|
|
115
|
-
"jsdoc.base.js"
|
|
119
|
+
"jsdoc.base.js",
|
|
120
|
+
"jsdoc.esmExports.js"
|
|
116
121
|
],
|
|
117
122
|
"funding": "https://www.paypal.com/donate/?business=LRYR6SZRWKXVY&no_recurring=0&item_name=Let%27s+build+together+today+to+simplify+our+jobs+tomorrow.¤cy_code=CAD",
|
|
118
123
|
"devDependencies": {
|
|
119
|
-
"clean-jsdoc-theme": "^
|
|
124
|
+
"clean-jsdoc-theme": "^4.3.3",
|
|
120
125
|
"gulp-imagemin": "github:jheagle/gulp-imagemin#common-js-compatibility",
|
|
121
126
|
"jsdoc": "^4.0.5",
|
|
127
|
+
"playwright": "~1.62.1",
|
|
122
128
|
"release-it": "^21.1.1",
|
|
123
129
|
"typedoc": "^0.28.20",
|
|
124
130
|
"typescript": "^6.0.3"
|