js-build-tools 5.7.0 → 6.1.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 +46 -3
- package/dist/build.js +40 -38
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +24 -23
- package/dist/bundle.min.js +1 -1
- package/dist/bundleMinify.js +14 -13
- package/dist/bundleMinify.min.js +1 -1
- package/dist/compileReadme.js +7 -7
- package/dist/copyFonts.js +14 -13
- package/dist/copyFonts.min.js +1 -1
- package/dist/default.js +16 -15
- package/dist/default.min.js +1 -1
- package/dist/dist.js +7 -7
- package/dist/distMinify.js +14 -13
- package/dist/distMinify.min.js +1 -1
- package/dist/images.js +7 -7
- package/dist/partials/addToReadme.js +3 -2
- package/dist/partials/beginWatcher.js +13 -12
- package/dist/partials/clean.js +15 -14
- package/dist/partials/distFor.js +22 -21
- package/dist/partials/distForSrc.js +12 -11
- package/dist/partials/distSeries.js +20 -19
- package/dist/partials/imagesFor.js +2 -1
- package/dist/partials/loadPeer.js +70 -70
- package/dist/partials/neostandardLint.js +163 -0
- package/dist/partials/readmeTemplate.js +15 -14
- package/dist/partials/runOnChange.js +29 -28
- package/dist/partials/sassFor.js +29 -28
- package/dist/partials/tsFor.js +2 -1
- package/dist/partials/typeDocsFor.js +2 -1
- package/dist/partials.js +136 -136
- package/dist/partials.min.js +1 -1
- package/dist/sass.js +7 -7
- package/dist/sourceLint.js +35 -0
- package/dist/sourceLint.min.js +1 -0
- package/dist/test-helpers/neostandardLintWithRealNeostandard.js +50 -0
- package/dist/test-helpers/setUp.js +2 -1
- package/dist/testFull.js +21 -20
- package/dist/testFull.min.js +1 -1
- package/dist/testHelpers.js +11 -10
- package/dist/testHelpers.min.js +1 -1
- package/dist/testQuick.js +23 -22
- package/dist/testQuick.min.js +1 -1
- package/dist/typeDocs.js +9 -9
- package/dist/typeScript.js +6 -6
- package/dist/utilities/convertMjsFilesForDocs.js +36 -36
- package/dist/utilities/dotNotate.js +48 -46
- package/dist/utilities/esmNamedExportsToCjs.js +18 -18
- package/dist/utilities/getBundleConfigs.js +3 -2
- package/dist/watchFull.js +7 -7
- package/dist/watchTest.js +17 -16
- package/dist/watchTest.min.js +1 -1
- package/functions/build.mjs +9 -8
- package/functions/build.test.mjs +18 -25
- package/functions/bundle.mjs +2 -2
- package/functions/partials/addToReadme.mjs +1 -1
- package/functions/partials/neostandardLint.mjs +130 -0
- package/functions/partials/neostandardLint.test.mjs +117 -0
- package/functions/partials.mjs +1 -1
- package/functions/sourceLint.mjs +24 -0
- package/functions/sourceLint.test.mjs +97 -0
- package/functions/test-helpers/neostandardLintWithRealNeostandard.mjs +40 -0
- package/functions/utilities/dotNotate.mjs +3 -1
- package/functions/utilities/dotNotate.test.mjs +34 -0
- package/functions/utilities/getBundleConfigs.mjs +1 -1
- package/gulp.config.mjs +14 -0
- package/gulpfile.base.js +2 -4
- package/gulpfile.base.mjs +1 -2
- package/package.json +7 -6
- package/dist/bundleLint.js +0 -28
- package/dist/bundleLint.min.js +0 -1
- package/dist/distLint.js +0 -20
- package/dist/distLint.min.js +0 -1
- package/dist/partials/standardLint.js +0 -94
- package/dist/test-helpers/standardLintWithRealStandard.js +0 -28
- package/functions/bundleLint.mjs +0 -18
- package/functions/bundleLint.test.mjs +0 -85
- package/functions/distLint.mjs +0 -12
- package/functions/distLint.test.mjs +0 -62
- package/functions/partials/standardLint.mjs +0 -78
- package/functions/partials/standardLint.test.mjs +0 -99
- package/functions/test-helpers/standardLintWithRealStandard.mjs +0 -21
package/dist/partials/sassFor.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.sassFor = void 0;
|
|
8
|
-
var _gulp = require("gulp");
|
|
9
|
-
var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
|
|
10
|
-
var _autoprefixer = _interopRequireDefault(require("autoprefixer"));
|
|
11
|
-
var _cssnano = _interopRequireDefault(require("cssnano"));
|
|
12
|
-
var _gulpPostcss = _interopRequireDefault(require("gulp-postcss"));
|
|
13
|
-
var _gulpRename = _interopRequireDefault(require("gulp-rename"));
|
|
14
|
-
var sass = _interopRequireWildcard(require("sass"));
|
|
15
|
-
var _gulpSass = _interopRequireDefault(require("gulp-sass"));
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.sassFor = void 0;
|
|
8
|
+
var _gulp = require("gulp");
|
|
9
|
+
var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
|
|
10
|
+
var _autoprefixer = _interopRequireDefault(require("autoprefixer"));
|
|
11
|
+
var _cssnano = _interopRequireDefault(require("cssnano"));
|
|
12
|
+
var _gulpPostcss = _interopRequireDefault(require("gulp-postcss"));
|
|
13
|
+
var _gulpRename = _interopRequireDefault(require("gulp-rename"));
|
|
14
|
+
var sass = _interopRequireWildcard(require("sass"));
|
|
15
|
+
var _gulpSass = _interopRequireDefault(require("gulp-sass"));
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
var cache;
|
|
18
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
19
|
+
const runSass = (0, _gulpSass.default)(sass);
|
|
20
|
+
|
|
20
21
|
/**
|
|
21
22
|
* Build the CSS for a given source pattern.
|
|
22
23
|
* @memberOf module:partials
|
|
23
24
|
* @param {string|array} [srcSearch='src/config/path/sass/for']
|
|
24
25
|
* @param {string} [cssPath='css/config/path']
|
|
25
26
|
* @returns {stream.Stream}
|
|
26
|
-
*/
|
|
27
|
-
const sassFor = (srcSearch = gulpConfig.get('sass.from'), cssPath = gulpConfig.get('sass.to')) => (0, _gulp.src)(srcSearch).pipe(runSass().on('error', runSass.logError)) // Passes it through a gulp-sass, log errors to console
|
|
28
|
-
.pipe((0, _gulp.dest)(cssPath))
|
|
29
|
-
// add: false - the old gulp-cssnano only ever removed obsolete vendor prefixes, never added any; keep that.
|
|
30
|
-
.pipe((0, _gulpPostcss.default)([(0, _autoprefixer.default)({
|
|
31
|
-
add: false
|
|
32
|
-
}), (0, _cssnano.default)()])).pipe((0, _gulpRename.default)({
|
|
33
|
-
extname: '.min.css'
|
|
34
|
-
})).pipe((0, _gulp.dest)(cssPath));
|
|
27
|
+
*/
|
|
28
|
+
const sassFor = (srcSearch = gulpConfig.get('sass.from'), cssPath = gulpConfig.get('sass.to')) => (0, _gulp.src)(srcSearch).pipe(runSass().on('error', runSass.logError)) // Passes it through a gulp-sass, log errors to console
|
|
29
|
+
.pipe((0, _gulp.dest)(cssPath))
|
|
30
|
+
// add: false - the old gulp-cssnano only ever removed obsolete vendor prefixes, never added any; keep that.
|
|
31
|
+
.pipe((0, _gulpPostcss.default)([(0, _autoprefixer.default)({
|
|
32
|
+
add: false
|
|
33
|
+
}), (0, _cssnano.default)()])).pipe((0, _gulpRename.default)({
|
|
34
|
+
extname: '.min.css'
|
|
35
|
+
})).pipe((0, _gulp.dest)(cssPath));
|
|
35
36
|
exports.sassFor = sassFor;
|
package/dist/partials/tsFor.js
CHANGED
|
@@ -9,7 +9,8 @@ var _gulp = require("gulp");
|
|
|
9
9
|
var _nodePath = _interopRequireDefault(require("node:path"));
|
|
10
10
|
var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
|
|
11
11
|
var _loadPeer = require("./loadPeer.js");
|
|
12
|
-
|
|
12
|
+
var cache;
|
|
13
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
// gulp-ts-compile ships ESM-only (no CJS build - see its own package.json), see importModule for how it is imported.
|
|
15
16
|
const importGulpTsCompile = () => (0, _loadPeer.importModule)('gulp-ts-compile');
|
|
@@ -20,7 +20,8 @@ var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
|
|
|
20
20
|
var _loadPeer = require("./loadPeer.js");
|
|
21
21
|
var _tsFor = require("./tsFor.js");
|
|
22
22
|
var _removeDirectory = require("./removeDirectory.js");
|
|
23
|
-
|
|
23
|
+
var cache;
|
|
24
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
24
25
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
26
|
const installHint = 'Install it in your project with: npm install --save-dev typedoc';
|
|
26
27
|
|
package/dist/partials.js
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
Object.defineProperty(exports,
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _addToReadme.addToReadme
|
|
10
|
-
}
|
|
11
|
-
})
|
|
12
|
-
Object.defineProperty(exports,
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _beginWatcher.beginWatcher
|
|
16
|
-
}
|
|
17
|
-
})
|
|
18
|
-
Object.defineProperty(exports,
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _clean.clean
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
Object.defineProperty(exports,
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _copyFor.copyFor
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
Object.defineProperty(exports,
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _distFor.distFor
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
Object.defineProperty(exports,
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _distForSrc.distForSrc
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
Object.defineProperty(exports,
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _distSeries.distSeries
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
Object.defineProperty(exports,
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _imagesFor.imagesFor
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
Object.defineProperty(exports,
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _loadPeer.importModule
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
Object.defineProperty(exports,
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _loadPeer.importPeer
|
|
64
|
-
}
|
|
65
|
-
})
|
|
66
|
-
Object.defineProperty(exports,
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _minifyFor.minifyFor
|
|
70
|
-
}
|
|
71
|
-
})
|
|
72
|
-
Object.defineProperty(exports,
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
Object.defineProperty(exports,
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
Object.defineProperty(exports,
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
Object.defineProperty(exports,
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
Object.defineProperty(exports,
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
Object.defineProperty(exports,
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
Object.defineProperty(exports,
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
-
return _tsFor.tsFor
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
Object.defineProperty(exports,
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
-
return _typeDocsFor.typeDocsFor
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
var _addToReadme = require(
|
|
121
|
-
var _beginWatcher = require(
|
|
122
|
-
var _clean = require(
|
|
123
|
-
var _copyFor = require(
|
|
124
|
-
var _distFor = require(
|
|
125
|
-
var _distForSrc = require(
|
|
126
|
-
var _distSeries = require(
|
|
127
|
-
var _imagesFor = require(
|
|
128
|
-
var _loadPeer = require(
|
|
129
|
-
var _minifyFor = require(
|
|
130
|
-
var
|
|
131
|
-
var
|
|
132
|
-
var
|
|
133
|
-
var
|
|
134
|
-
var
|
|
135
|
-
var _tsFor = require(
|
|
136
|
-
var _typeDocsFor = require(
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "addToReadme", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _addToReadme.addToReadme;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "beginWatcher", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _beginWatcher.beginWatcher;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "clean", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _clean.clean;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "copyFor", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _copyFor.copyFor;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "distFor", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _distFor.distFor;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "distForSrc", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _distForSrc.distForSrc;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "distSeries", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _distSeries.distSeries;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "imagesFor", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _imagesFor.imagesFor;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "importModule", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _loadPeer.importModule;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "importPeer", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _loadPeer.importPeer;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "minifyFor", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _minifyFor.minifyFor;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "neostandardLint", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _neostandardLint.neostandardLint;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "readmeTemplate", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _readmeTemplate.readmeTemplate;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "removeDirectory", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _removeDirectory.removeDirectory;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "requirePeer", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _loadPeer.requirePeer;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "runOnChange", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _runOnChange.runOnChange;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "sassFor", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _sassFor.sassFor;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "tsFor", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _tsFor.tsFor;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "typeDocsFor", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _typeDocsFor.typeDocsFor;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
var _addToReadme = require("./partials/addToReadme.js");
|
|
121
|
+
var _beginWatcher = require("./partials/beginWatcher.js");
|
|
122
|
+
var _clean = require("./partials/clean.js");
|
|
123
|
+
var _copyFor = require("./partials/copyFor.js");
|
|
124
|
+
var _distFor = require("./partials/distFor.js");
|
|
125
|
+
var _distForSrc = require("./partials/distForSrc.js");
|
|
126
|
+
var _distSeries = require("./partials/distSeries.js");
|
|
127
|
+
var _imagesFor = require("./partials/imagesFor.js");
|
|
128
|
+
var _loadPeer = require("./partials/loadPeer.js");
|
|
129
|
+
var _minifyFor = require("./partials/minifyFor.js");
|
|
130
|
+
var _neostandardLint = require("./partials/neostandardLint.js");
|
|
131
|
+
var _readmeTemplate = require("./partials/readmeTemplate.js");
|
|
132
|
+
var _removeDirectory = require("./partials/removeDirectory.js");
|
|
133
|
+
var _runOnChange = require("./partials/runOnChange.js");
|
|
134
|
+
var _sassFor = require("./partials/sassFor.js");
|
|
135
|
+
var _tsFor = require("./partials/tsFor.js");
|
|
136
|
+
var _typeDocsFor = require("./partials/typeDocsFor.js");
|
package/dist/partials.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"addToReadme",{enumerable:!0,get:function(){return _addToReadme.addToReadme}}),Object.defineProperty(exports,"beginWatcher",{enumerable:!0,get:function(){return _beginWatcher.beginWatcher}}),Object.defineProperty(exports,"clean",{enumerable:!0,get:function(){return _clean.clean}}),Object.defineProperty(exports,"copyFor",{enumerable:!0,get:function(){return _copyFor.copyFor}}),Object.defineProperty(exports,"distFor",{enumerable:!0,get:function(){return _distFor.distFor}}),Object.defineProperty(exports,"distForSrc",{enumerable:!0,get:function(){return _distForSrc.distForSrc}}),Object.defineProperty(exports,"distSeries",{enumerable:!0,get:function(){return _distSeries.distSeries}}),Object.defineProperty(exports,"imagesFor",{enumerable:!0,get:function(){return _imagesFor.imagesFor}}),Object.defineProperty(exports,"importModule",{enumerable:!0,get:function(){return _loadPeer.importModule}}),Object.defineProperty(exports,"importPeer",{enumerable:!0,get:function(){return _loadPeer.importPeer}}),Object.defineProperty(exports,"minifyFor",{enumerable:!0,get:function(){return _minifyFor.minifyFor}}),Object.defineProperty(exports,"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"addToReadme",{enumerable:!0,get:function(){return _addToReadme.addToReadme}}),Object.defineProperty(exports,"beginWatcher",{enumerable:!0,get:function(){return _beginWatcher.beginWatcher}}),Object.defineProperty(exports,"clean",{enumerable:!0,get:function(){return _clean.clean}}),Object.defineProperty(exports,"copyFor",{enumerable:!0,get:function(){return _copyFor.copyFor}}),Object.defineProperty(exports,"distFor",{enumerable:!0,get:function(){return _distFor.distFor}}),Object.defineProperty(exports,"distForSrc",{enumerable:!0,get:function(){return _distForSrc.distForSrc}}),Object.defineProperty(exports,"distSeries",{enumerable:!0,get:function(){return _distSeries.distSeries}}),Object.defineProperty(exports,"imagesFor",{enumerable:!0,get:function(){return _imagesFor.imagesFor}}),Object.defineProperty(exports,"importModule",{enumerable:!0,get:function(){return _loadPeer.importModule}}),Object.defineProperty(exports,"importPeer",{enumerable:!0,get:function(){return _loadPeer.importPeer}}),Object.defineProperty(exports,"minifyFor",{enumerable:!0,get:function(){return _minifyFor.minifyFor}}),Object.defineProperty(exports,"neostandardLint",{enumerable:!0,get:function(){return _neostandardLint.neostandardLint}}),Object.defineProperty(exports,"readmeTemplate",{enumerable:!0,get:function(){return _readmeTemplate.readmeTemplate}}),Object.defineProperty(exports,"removeDirectory",{enumerable:!0,get:function(){return _removeDirectory.removeDirectory}}),Object.defineProperty(exports,"requirePeer",{enumerable:!0,get:function(){return _loadPeer.requirePeer}}),Object.defineProperty(exports,"runOnChange",{enumerable:!0,get:function(){return _runOnChange.runOnChange}}),Object.defineProperty(exports,"sassFor",{enumerable:!0,get:function(){return _sassFor.sassFor}}),Object.defineProperty(exports,"tsFor",{enumerable:!0,get:function(){return _tsFor.tsFor}}),Object.defineProperty(exports,"typeDocsFor",{enumerable:!0,get:function(){return _typeDocsFor.typeDocsFor}});var _addToReadme=require("./partials/addToReadme.js"),_beginWatcher=require("./partials/beginWatcher.js"),_clean=require("./partials/clean.js"),_copyFor=require("./partials/copyFor.js"),_distFor=require("./partials/distFor.js"),_distForSrc=require("./partials/distForSrc.js"),_distSeries=require("./partials/distSeries.js"),_imagesFor=require("./partials/imagesFor.js"),_loadPeer=require("./partials/loadPeer.js"),_minifyFor=require("./partials/minifyFor.js"),_neostandardLint=require("./partials/neostandardLint.js"),_readmeTemplate=require("./partials/readmeTemplate.js"),_removeDirectory=require("./partials/removeDirectory.js"),_runOnChange=require("./partials/runOnChange.js"),_sassFor=require("./partials/sassFor.js"),_tsFor=require("./partials/tsFor.js"),_typeDocsFor=require("./partials/typeDocsFor.js");
|
package/dist/sass.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.sass = void 0
|
|
7
|
-
|
|
5
|
+
});
|
|
6
|
+
exports.sass = void 0;
|
|
7
|
+
var _sassFor = require("./partials/sassFor.js");
|
|
8
8
|
// Compile sass into CSS & auto-inject into browsers
|
|
9
|
-
const sass = () => (0, _sassFor.sassFor)()
|
|
10
|
-
exports.sass = sass
|
|
9
|
+
const sass = () => (0, _sassFor.sassFor)();
|
|
10
|
+
exports.sass = sass;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.sourceLint = void 0;
|
|
8
|
+
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
9
|
+
var _gulp = require("gulp");
|
|
10
|
+
var _neostandardLint = require("./partials/neostandardLint.js");
|
|
11
|
+
var cache;
|
|
12
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
13
|
+
/**
|
|
14
|
+
* Applies neostandard linting (js-build-tools' chosen style) to the real, hand-written source - not the compiled
|
|
15
|
+
* dist/browser output, which is generated and so was never going to pass a hand-authored-code style check (every
|
|
16
|
+
* compiler/bundler emits its own boilerplate - import aliasing, interop headers - that only looks like a style
|
|
17
|
+
* violation). Includes test files: there is no reason to hold tests to a lower style bar than the rest of the
|
|
18
|
+
* source. When typescript.enabled, the real TypeScript source is linted too, with type-aware rules.
|
|
19
|
+
* @memberOf module:js-build-tools
|
|
20
|
+
* @returns {*}
|
|
21
|
+
*/
|
|
22
|
+
const sourceLint = () => {
|
|
23
|
+
const srcPath = gulpConfig.get('srcPath');
|
|
24
|
+
const ts = gulpConfig.get('typescript.enabled');
|
|
25
|
+
const patterns = [`${srcPath}/**/*.js`];
|
|
26
|
+
if (ts) {
|
|
27
|
+
patterns.push(`${srcPath}/**/*.ts`);
|
|
28
|
+
}
|
|
29
|
+
return (0, _gulp.src)(patterns).pipe((0, _neostandardLint.neostandardLint)({
|
|
30
|
+
fix: true,
|
|
31
|
+
ts,
|
|
32
|
+
rules: gulpConfig.get('lint.rules')
|
|
33
|
+
})).pipe((0, _gulp.dest)(srcPath));
|
|
34
|
+
};
|
|
35
|
+
exports.sourceLint = sourceLint;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.sourceLint=void 0;var cache,gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_gulp=require("gulp"),_neostandardLint=require("./partials/neostandardLint.js");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var r,n,i=Object.defineProperty,s={__proto__:null,default:e};if(Object(e)!==e)return s;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,s)}for(n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((r=i&&Object.getOwnPropertyDescriptor(e,n))&&(r.get||r.set)?i(s,n,r):s[n]=e[n]);return s}const sourceLint=()=>{const e=gulpConfig.get("srcPath"),t=gulpConfig.get("typescript.enabled"),r=[`${e}/**/*.js`];return t&&r.push(`${e}/**/*.ts`),(0,_gulp.src)(r).pipe((0,_neostandardLint.neostandardLint)({fix:!0,ts:t,rules:gulpConfig.get("lint.rules")})).pipe((0,_gulp.dest)(e))};exports.sourceLint=sourceLint;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.neostandardLint = exports.loadEslintViaSubprocess = void 0;
|
|
7
|
+
require("core-js/modules/es.json.stringify.js");
|
|
8
|
+
var _nodeChild_process = require("node:child_process");
|
|
9
|
+
var _nodeFs = _interopRequireDefault(require("node:fs"));
|
|
10
|
+
var _nodePath = _interopRequireDefault(require("node:path"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
// Jest's CommonJS transform cannot load `neostandard` (ESM-only) or run a real dynamic import(), so tests that need
|
|
13
|
+
// genuine neostandard behavior run the actual package in a plain Node subprocess instead of faking it.
|
|
14
|
+
const script = 'import { readFileSync } from \'node:fs\'\n' + 'import { ESLint } from \'eslint\'\n' + 'import { neostandard, defaultFilePatterns } from \'neostandard\'\n' + 'const { text, filePath, cwd, fix, ts, env, rules } = JSON.parse(readFileSync(0, \'utf8\'))\n' + 'const baseConfig = neostandard({ ts, env })\n' + 'if (Object.keys(rules).length) { baseConfig.push({ files: defaultFilePatterns.all, rules }) }\n' + 'const eslint = new ESLint({ cwd, fix, overrideConfigFile: true, baseConfig })\n' + 'process.stdout.write(JSON.stringify(await eslint.lintText(text, { filePath })))\n';
|
|
15
|
+
const readEnv = cwd => {
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(_nodeFs.default.readFileSync(_nodePath.default.join(cwd, 'package.json'), 'utf8')).standard?.env ?? [];
|
|
18
|
+
} catch {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const loadEslintViaSubprocess = ({
|
|
23
|
+
cwd,
|
|
24
|
+
ts,
|
|
25
|
+
fix,
|
|
26
|
+
rules = {}
|
|
27
|
+
}) => Promise.resolve({
|
|
28
|
+
lintText: (text, {
|
|
29
|
+
filePath
|
|
30
|
+
}) => Promise.resolve().then(() => JSON.parse((0, _nodeChild_process.execFileSync)(process.execPath, ['--input-type=module', '--eval', script], {
|
|
31
|
+
input: JSON.stringify({
|
|
32
|
+
text,
|
|
33
|
+
filePath,
|
|
34
|
+
cwd,
|
|
35
|
+
fix,
|
|
36
|
+
ts,
|
|
37
|
+
env: readEnv(cwd),
|
|
38
|
+
rules
|
|
39
|
+
}),
|
|
40
|
+
encoding: 'utf8',
|
|
41
|
+
cwd,
|
|
42
|
+
maxBuffer: 256 * 1024 * 1024
|
|
43
|
+
})))
|
|
44
|
+
});
|
|
45
|
+
exports.loadEslintViaSubprocess = loadEslintViaSubprocess;
|
|
46
|
+
const actual = jest.requireActual('../partials/neostandardLint.js');
|
|
47
|
+
|
|
48
|
+
// Drop-in replacement for the partial module (see jest.mock in the lint/build tests): same API, real neostandard.
|
|
49
|
+
const neostandardLint = options => actual.neostandardLint(options, loadEslintViaSubprocess);
|
|
50
|
+
exports.neostandardLint = neostandardLint;
|
|
@@ -51,7 +51,8 @@ exports.setDefaults = void 0;
|
|
|
51
51
|
var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
|
|
52
52
|
exports.gulpConfig = gulpConfig;
|
|
53
53
|
var _testFilesystem = require("test-filesystem");
|
|
54
|
-
|
|
54
|
+
var cache;
|
|
55
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
55
56
|
// Import the configurations and override some of them to direct to the temp directory.
|
|
56
57
|
|
|
57
58
|
let tempDir = 'test-temp/';
|
package/dist/testFull.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
require(
|
|
4
|
-
Object.defineProperty(exports,
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.testFull = void 0
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.testFull = void 0;
|
|
8
|
+
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
9
|
+
var _jest = require("jest");
|
|
10
|
+
var cache;
|
|
11
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
11
12
|
/**
|
|
12
13
|
* Run all tests with jest.
|
|
13
14
|
* Configure where tests are located by using 'testPath'.
|
|
14
15
|
* @memberOf module:js-build-tools
|
|
15
16
|
* @returns {Promise<*>}
|
|
16
|
-
*/
|
|
17
|
-
const testFull = () => {
|
|
18
|
-
let testPath = gulpConfig.get('test.path')
|
|
19
|
-
if (!Array.isArray(testPath)) {
|
|
20
|
-
// The testPath must be an array of strings
|
|
21
|
-
testPath = [testPath]
|
|
22
|
-
}
|
|
23
|
-
return (0, _jest.runCLI)(gulpConfig.get('test.options'), testPath)
|
|
24
|
-
}
|
|
25
|
-
exports.testFull = testFull
|
|
17
|
+
*/
|
|
18
|
+
const testFull = () => {
|
|
19
|
+
let testPath = gulpConfig.get('test.path');
|
|
20
|
+
if (!Array.isArray(testPath)) {
|
|
21
|
+
// The testPath must be an array of strings
|
|
22
|
+
testPath = [testPath];
|
|
23
|
+
}
|
|
24
|
+
return (0, _jest.runCLI)(gulpConfig.get('test.options'), testPath);
|
|
25
|
+
};
|
|
26
|
+
exports.testFull = testFull;
|
package/dist/testFull.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testFull=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_jest=require("jest");function _interopRequireWildcard(e,t){if(
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testFull=void 0;var cache,gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_jest=require("jest");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var r,s,u=Object.defineProperty,c={__proto__:null,default:e};if(Object(e)!==e)return c;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,c)}for(s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((r=u&&Object.getOwnPropertyDescriptor(e,s))&&(r.get||r.set)?u(c,s,r):c[s]=e[s]);return c}const testFull=()=>{let e=gulpConfig.get("test.path");return Array.isArray(e)||(e=[e]),(0,_jest.runCLI)(gulpConfig.get("test.options"),e)};exports.testFull=testFull;
|
package/dist/testHelpers.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
require(
|
|
4
|
-
Object.defineProperty(exports,
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.testHelpers = void 0
|
|
8
|
-
|
|
9
|
-
exports.testHelpers = _testHelpers
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.testHelpers = void 0;
|
|
8
|
+
var _testHelpers = _interopRequireWildcard(require("./test-helpers/setUp.js"));
|
|
9
|
+
exports.testHelpers = _testHelpers;
|
|
10
|
+
var cache;
|
|
11
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
package/dist/testHelpers.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testHelpers=void 0;var _testHelpers=_interopRequireWildcard(require("./test-helpers/setUp.js"));function _interopRequireWildcard(e,t){if(
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testHelpers=void 0;var cache,_testHelpers=_interopRequireWildcard(require("./test-helpers/setUp.js"));function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var r,s,c=Object.defineProperty,a={__proto__:null,default:e};if(Object(e)!==e)return a;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,a)}for(s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((r=c&&Object.getOwnPropertyDescriptor(e,s))&&(r.get||r.set)?c(a,s,r):a[s]=e[s]);return a}exports.testHelpers=_testHelpers;
|