js-build-tools 5.3.2 → 5.5.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.
@@ -1,38 +1,38 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.standardLint = void 0;
7
- require("core-js/modules/esnext.iterator.constructor.js");
8
- require("core-js/modules/esnext.iterator.for-each.js");
9
- var _nodePath = _interopRequireDefault(require("node:path"));
10
- var _through = _interopRequireDefault(require("through2"));
11
- var _loadPeer = require("./loadPeer.js");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- // `standard` (17+) ships ESM-only, see importModule for how it is imported.
14
- const importStandard = () => (0, _loadPeer.importModule)('standard');
15
-
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.standardLint = void 0;
7
+ require("core-js/modules/esnext.iterator.constructor.js");
8
+ require("core-js/modules/esnext.iterator.for-each.js");
9
+ var _nodePath = _interopRequireDefault(require("node:path"));
10
+ var _through = _interopRequireDefault(require("through2"));
11
+ var _loadPeer = require("./loadPeer.js");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ // `standard` (17+) ships ESM-only, see importModule for how it is imported.
14
+ const importStandard = () => (0, _loadPeer.importModule)('standard');
15
+
16
16
  /**
17
17
  * Print a file's lint messages, if it has any.
18
18
  * @memberOf module:partials
19
19
  * @param {import('vinyl')} file
20
20
  * @param {{messages: Array<{line: number, column: number, message: string}>, errorCount: number, warningCount: number}} result
21
21
  * @returns {undefined}
22
- */
23
- const printFileReport = (file, result) => {
24
- if (!result.messages.length) {
25
- return;
26
- }
27
- console.log(_nodePath.default.relative(file.cwd, file.path));
28
- result.messages.forEach(({
29
- line,
30
- column,
31
- message
32
- }) => console.log(`line ${line}:${column}\t${message}`));
33
- console.log(`✖ ${result.errorCount} error\t⚠ ${result.warningCount} warning\n`);
34
- };
35
-
22
+ */
23
+ const printFileReport = (file, result) => {
24
+ if (!result.messages.length) {
25
+ return;
26
+ }
27
+ console.log(_nodePath.default.relative(file.cwd, file.path));
28
+ result.messages.forEach(({
29
+ line,
30
+ column,
31
+ message
32
+ }) => console.log(`line ${line}:${column}\t${message}`));
33
+ console.log(`✖ ${result.errorCount} error\t⚠ ${result.warningCount} warning\n`);
34
+ };
35
+
36
36
  /**
37
37
  * Lint every file streaming through with JavaScript Standard Style and, unless `fix` is false, apply the automatic
38
38
  * fixes to the file's contents so a following `dest()` writes the fixed version. Remaining problems are printed
@@ -47,48 +47,48 @@ const printFileReport = (file, result) => {
47
47
  * should never need to pass this - it exists so tests can supply a stand-in, since this project's
48
48
  * CommonJS-transform-based Jest setup cannot execute a real dynamic import() of an ES module.
49
49
  * @returns {import('stream').Transform}
50
- */
51
- const standardLint = ({
52
- fix = true
53
- } = {}, loadStandard = () => importStandard().then(({
54
- default: standard
55
- }) => standard)) => {
56
- const totals = {
57
- errors: 0,
58
- warnings: 0
59
- };
60
- return _through.default.obj(function (file, enc, callback) {
61
- if (file.isNull()) {
62
- callback(null, file);
63
- return;
64
- }
65
- if (file.isStream()) {
66
- callback(new Error('standardLint: streaming file contents are not supported.'));
67
- return;
68
- }
69
- loadStandard().then(standard => standard.lintText(file.contents.toString(), {
70
- filename: file.path,
71
- cwd: file.cwd,
72
- fix
73
- })).then(results => {
74
- // No result at all means the file is ignored by the project's Standard configuration.
75
- const [result] = results;
76
- if (result) {
77
- if (typeof result.output === 'string') {
78
- file.contents = Buffer.from(result.output);
79
- }
80
- totals.errors += result.errorCount;
81
- totals.warnings += result.warningCount;
82
- printFileReport(file, result);
83
- }
84
- callback(null, file);
85
- }, callback);
86
- }, function (callback) {
87
- console.log('Standard linter results');
88
- console.log('======================================');
89
- console.log(`✖ Errors total: ${totals.errors}`);
90
- console.log(`⚠ Warnings total: ${totals.warnings}\n`);
91
- callback();
92
- });
93
- };
50
+ */
51
+ const standardLint = ({
52
+ fix = true
53
+ } = {}, loadStandard = () => importStandard().then(({
54
+ default: standard
55
+ }) => standard)) => {
56
+ const totals = {
57
+ errors: 0,
58
+ warnings: 0
59
+ };
60
+ return _through.default.obj(function (file, enc, callback) {
61
+ if (file.isNull()) {
62
+ callback(null, file);
63
+ return;
64
+ }
65
+ if (file.isStream()) {
66
+ callback(new Error('standardLint: streaming file contents are not supported.'));
67
+ return;
68
+ }
69
+ loadStandard().then(standard => standard.lintText(file.contents.toString(), {
70
+ filename: file.path,
71
+ cwd: file.cwd,
72
+ fix
73
+ })).then(results => {
74
+ // No result at all means the file is ignored by the project's Standard configuration.
75
+ const [result] = results;
76
+ if (result) {
77
+ if (typeof result.output === 'string') {
78
+ file.contents = Buffer.from(result.output);
79
+ }
80
+ totals.errors += result.errorCount;
81
+ totals.warnings += result.warningCount;
82
+ printFileReport(file, result);
83
+ }
84
+ callback(null, file);
85
+ }, callback);
86
+ }, function (callback) {
87
+ console.log('Standard linter results');
88
+ console.log('======================================');
89
+ console.log(`✖ Errors total: ${totals.errors}`);
90
+ console.log(`⚠ Warnings total: ${totals.warnings}\n`);
91
+ callback();
92
+ });
93
+ };
94
94
  exports.standardLint = standardLint;
@@ -1,27 +1,27 @@
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.tsFor = exports.loadTypescript = void 0;
8
- var _gulp = require("gulp");
9
- var _nodePath = _interopRequireDefault(require("node:path"));
10
- var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
11
- var _loadPeer = require("./loadPeer.js");
12
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- // gulp-ts-compile ships ESM-only (no CJS build - see its own package.json), see importModule for how it is imported.
15
- const importGulpTsCompile = () => (0, _loadPeer.importModule)('gulp-ts-compile');
16
-
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.tsFor = exports.loadTypescript = void 0;
8
+ var _gulp = require("gulp");
9
+ var _nodePath = _interopRequireDefault(require("node:path"));
10
+ var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
11
+ var _loadPeer = require("./loadPeer.js");
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ // gulp-ts-compile ships ESM-only (no CJS build - see its own package.json), see importModule for how it is imported.
15
+ const importGulpTsCompile = () => (0, _loadPeer.importModule)('gulp-ts-compile');
16
+
17
17
  /**
18
18
  * Wrap a stream in a promise that resolves once it finishes writing.
19
19
  * @memberOf module:partials
20
20
  * @param {import('node:stream').Stream} stream
21
21
  * @returns {Promise<void>}
22
- */
23
- const installHint = 'Install it in your project with: npm install --save-dev typescript';
24
-
22
+ */
23
+ const installHint = 'Install it in your project with: npm install --save-dev typescript';
24
+
25
25
  /**
26
26
  * Load the project's own copy of TypeScript (an optional peer dependency, only needed when the typescript task is
27
27
  * enabled) from the project being built, so projects which do not use TypeScript never need it installed.
@@ -29,18 +29,18 @@ const installHint = 'Install it in your project with: npm install --save-dev typ
29
29
  * @param {string} [projectPath=process.cwd()] The folder of the project (which has the package.json) being built.
30
30
  * @returns {Object} The TypeScript compiler API module.
31
31
  * @throws {Error} With install instructions when typescript is not installed.
32
- */
33
- const loadTypescript = (projectPath = process.cwd()) => (0, _loadPeer.requirePeer)('typescript', {
34
- task: 'typescript',
35
- installHint,
36
- projectPath
37
- });
38
- exports.loadTypescript = loadTypescript;
39
- const streamToPromise = stream => new Promise((resolve, reject) => {
40
- stream.on('finish', resolve);
41
- stream.on('error', reject);
42
- });
43
-
32
+ */
33
+ const loadTypescript = (projectPath = process.cwd()) => (0, _loadPeer.requirePeer)('typescript', {
34
+ task: 'typescript',
35
+ installHint,
36
+ projectPath
37
+ });
38
+ exports.loadTypescript = loadTypescript;
39
+ const streamToPromise = stream => new Promise((resolve, reject) => {
40
+ stream.on('finish', resolve);
41
+ stream.on('error', reject);
42
+ });
43
+
44
44
  /**
45
45
  * Read a tsconfig.json file into real typescript.CompilerOptions values, using only TypeScript's stable, current,
46
46
  * public config-reading API (the same one `tsc --project` itself uses internally) - never
@@ -49,13 +49,13 @@ const streamToPromise = stream => new Promise((resolve, reject) => {
49
49
  * @memberOf module:partials
50
50
  * @param {string} configPath - Path to a tsconfig.json file.
51
51
  * @returns {import('typescript').CompilerOptions}
52
- */
53
- const readCompilerOptions = (ts, configPath) => {
54
- const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
55
- const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, _nodePath.default.dirname(configPath));
56
- return parsedConfig.options;
57
- };
58
-
52
+ */
53
+ const readCompilerOptions = (ts, configPath) => {
54
+ const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
55
+ const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, _nodePath.default.dirname(configPath));
56
+ return parsedConfig.options;
57
+ };
58
+
59
59
  /**
60
60
  * Starting at the source directory, find all the ts files and convert them into the distribution directory.
61
61
  * @memberOf module:partials
@@ -68,36 +68,36 @@ const readCompilerOptions = (ts, configPath) => {
68
68
  * suite already covers real TypeScript-compile correctness - this function's own tests only need to verify its
69
69
  * config resolution and stream wiring.
70
70
  * @returns {Function}
71
- */
72
- const tsFor = (srcPath = gulpConfig.get('typescript.from'), distPath = gulpConfig.get('typescript.to'), loadTsCompile = () => importGulpTsCompile().then(({
73
- default: tsCompile
74
- }) => tsCompile)) => {
75
- if (gulpConfig.get('typescript.enabled') === false) {
76
- return () => {};
77
- }
78
- const ts = loadTypescript();
79
- const configPath = gulpConfig.get('typescript.config');
80
- // When no tsconfig.json is configured, target/module are pinned explicitly rather than left for TypeScript's
81
- // own compiler defaults - those defaults have already shifted once across a TypeScript version bump in this
82
- // project's own history (silently changing whether output keeps `const`/`let` or downlevels to `var`), and
83
- // pinning them keeps this task's output stable across future TypeScript upgrades too. ES5/CommonJS matches
84
- // what the downstream babel/browserify bundling pipeline has always assumed it receives.
85
- const compilerOptions = configPath ? readCompilerOptions(ts, configPath) : {
86
- declaration: true,
87
- target: ts.ScriptTarget.ES5,
88
- module: ts.ModuleKind.CommonJS,
89
- esModuleInterop: false
90
- };
91
- // Accepts gulp's own callback-style task convention (an optional `done`, called once finished) rather than
92
- // just returning a Promise, since callers may invoke the returned function directly with a callback instead
93
- // of relying on gulp's own runner to observe a returned Promise.
94
- return done => {
95
- const compile = async () => {
96
- const tsCompile = await loadTsCompile();
97
- const tsResult = (0, _gulp.src)(srcPath).pipe(tsCompile(compilerOptions));
98
- await Promise.all([streamToPromise(tsResult.dts.pipe((0, _gulp.dest)(distPath))), streamToPromise(tsResult.js.pipe((0, _gulp.dest)(distPath)))]);
99
- };
100
- return typeof done === 'function' ? compile().then(() => done(), done) : compile();
101
- };
102
- };
71
+ */
72
+ const tsFor = (srcPath = gulpConfig.get('typescript.from'), distPath = gulpConfig.get('typescript.to'), loadTsCompile = () => importGulpTsCompile().then(({
73
+ default: tsCompile
74
+ }) => tsCompile)) => {
75
+ if (gulpConfig.get('typescript.enabled') === false) {
76
+ return () => {};
77
+ }
78
+ const ts = loadTypescript();
79
+ const configPath = gulpConfig.get('typescript.config');
80
+ // When no tsconfig.json is configured, target/module are pinned explicitly rather than left for TypeScript's
81
+ // own compiler defaults - those defaults have already shifted once across a TypeScript version bump in this
82
+ // project's own history (silently changing whether output keeps `const`/`let` or downlevels to `var`), and
83
+ // pinning them keeps this task's output stable across future TypeScript upgrades too. ES5/CommonJS matches
84
+ // what the downstream babel/browserify bundling pipeline has always assumed it receives.
85
+ const compilerOptions = configPath ? readCompilerOptions(ts, configPath) : {
86
+ declaration: true,
87
+ target: ts.ScriptTarget.ES5,
88
+ module: ts.ModuleKind.CommonJS,
89
+ esModuleInterop: false
90
+ };
91
+ // Accepts gulp's own callback-style task convention (an optional `done`, called once finished) rather than
92
+ // just returning a Promise, since callers may invoke the returned function directly with a callback instead
93
+ // of relying on gulp's own runner to observe a returned Promise.
94
+ return done => {
95
+ const compile = async () => {
96
+ const tsCompile = await loadTsCompile();
97
+ const tsResult = (0, _gulp.src)(srcPath).pipe(tsCompile(compilerOptions));
98
+ await Promise.all([streamToPromise(tsResult.dts.pipe((0, _gulp.dest)(distPath))), streamToPromise(tsResult.js.pipe((0, _gulp.dest)(distPath)))]);
99
+ };
100
+ return typeof done === 'function' ? compile().then(() => done(), done) : compile();
101
+ };
102
+ };
103
103
  exports.tsFor = tsFor;
package/dist/partials.js CHANGED
@@ -1,136 +1,136 @@
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, 'readmeTemplate', {
73
- enumerable: true,
74
- get: function () {
75
- return _readmeTemplate.readmeTemplate
76
- }
77
- })
78
- Object.defineProperty(exports, 'removeDirectory', {
79
- enumerable: true,
80
- get: function () {
81
- return _removeDirectory.removeDirectory
82
- }
83
- })
84
- Object.defineProperty(exports, 'requirePeer', {
85
- enumerable: true,
86
- get: function () {
87
- return _loadPeer.requirePeer
88
- }
89
- })
90
- Object.defineProperty(exports, 'runOnChange', {
91
- enumerable: true,
92
- get: function () {
93
- return _runOnChange.runOnChange
94
- }
95
- })
96
- Object.defineProperty(exports, 'sassFor', {
97
- enumerable: true,
98
- get: function () {
99
- return _sassFor.sassFor
100
- }
101
- })
102
- Object.defineProperty(exports, 'standardLint', {
103
- enumerable: true,
104
- get: function () {
105
- return _standardLint.standardLint
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 _readmeTemplate = require('./partials/readmeTemplate.js')
131
- var _removeDirectory = require('./partials/removeDirectory.js')
132
- var _runOnChange = require('./partials/runOnChange.js')
133
- var _sassFor = require('./partials/sassFor.js')
134
- var _standardLint = require('./partials/standardLint.js')
135
- var _tsFor = require('./partials/tsFor.js')
136
- var _typeDocsFor = require('./partials/typeDocsFor.js')
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, 'readmeTemplate', {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _readmeTemplate.readmeTemplate
76
+ }
77
+ })
78
+ Object.defineProperty(exports, 'removeDirectory', {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _removeDirectory.removeDirectory
82
+ }
83
+ })
84
+ Object.defineProperty(exports, 'requirePeer', {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _loadPeer.requirePeer
88
+ }
89
+ })
90
+ Object.defineProperty(exports, 'runOnChange', {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _runOnChange.runOnChange
94
+ }
95
+ })
96
+ Object.defineProperty(exports, 'sassFor', {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _sassFor.sassFor
100
+ }
101
+ })
102
+ Object.defineProperty(exports, 'standardLint', {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _standardLint.standardLint
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 _readmeTemplate = require('./partials/readmeTemplate.js')
131
+ var _removeDirectory = require('./partials/removeDirectory.js')
132
+ var _runOnChange = require('./partials/runOnChange.js')
133
+ var _sassFor = require('./partials/sassFor.js')
134
+ var _standardLint = require('./partials/standardLint.js')
135
+ var _tsFor = require('./partials/tsFor.js')
136
+ var _typeDocsFor = require('./partials/typeDocsFor.js')
package/dist/typeDocs.js CHANGED
@@ -1,14 +1,14 @@
1
- 'use strict'
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- })
6
- exports.typeDocs = void 0
7
- const _typeDocsFor = require('./partials/typeDocsFor.js')
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.typeDocs = void 0
7
+ const _typeDocsFor = require('./partials/typeDocsFor.js')
8
8
  /**
9
9
  * Generate the HTML documentation of a TypeScript project from its source, with the modules mirroring the source
10
10
  * folders. Turn it on with docs.enabled, see {@link module:partials.typeDocsFor}.
11
11
  * @memberOf module:js-build-tools
12
12
  * @returns {Function}
13
- */
14
- const typeDocs = exports.typeDocs = (0, _typeDocsFor.typeDocsFor)()
13
+ */
14
+ const typeDocs = exports.typeDocs = (0, _typeDocsFor.typeDocsFor)()
@@ -0,0 +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.getBundleConfigs = void 0;
8
+ require("core-js/modules/esnext.iterator.constructor.js");
9
+ require("core-js/modules/esnext.iterator.map.js");
10
+ var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ /**
13
+ * Build the full list of bundles to produce for this project: the primary bundle (browser.name /
14
+ * dist.main / browser.ignore / browser.exclude, exactly as before browser.bundles existed) plus
15
+ * any additional bundles from browser.bundles - each falling back to the primary's main / ignore /
16
+ * exclude whenever its own isn't given, so a render-only (or any other variant) bundle only has to
17
+ * specify what's actually different about it.
18
+ * @memberOf module:utilities
19
+ * @returns {Array<{name: string, main: string, ignore: Array, exclude: Array}>}
20
+ */
21
+ const getBundleConfigs = () => {
22
+ const primary = {
23
+ name: gulpConfig.get('browser.name'),
24
+ main: gulpConfig.get('dist.main'),
25
+ ignore: gulpConfig.get('browser.ignore'),
26
+ exclude: gulpConfig.get('browser.exclude')
27
+ };
28
+ const additional = gulpConfig.get('browser.bundles') || [];
29
+ return [primary, ...additional.map(bundleConfig => ({
30
+ name: bundleConfig.name,
31
+ main: bundleConfig.main || primary.main,
32
+ ignore: bundleConfig.ignore || primary.ignore,
33
+ exclude: bundleConfig.exclude || primary.exclude
34
+ }))];
35
+ };
36
+ exports.getBundleConfigs = getBundleConfigs;