js-build-tools 6.1.0 → 6.2.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 +89 -25
- package/dist/build.js +68 -63
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +40 -40
- package/dist/bundleMinify.js +18 -18
- package/dist/copyFiles.js +47 -0
- package/dist/copyFiles.min.js +1 -0
- package/dist/copyFonts.js +13 -13
- package/dist/default.js +15 -15
- package/dist/distMinify.js +13 -13
- package/dist/jsdocDocs.js +15 -0
- package/dist/jsdocDocs.min.js +1 -0
- package/dist/partials/addToReadme.js +25 -25
- package/dist/partials/beginWatcher.js +13 -13
- package/dist/partials/clean.js +15 -15
- package/dist/partials/copyFor.js +10 -2
- package/dist/partials/distFor.js +22 -22
- package/dist/partials/distForSrc.js +12 -12
- package/dist/partials/distSeries.js +20 -20
- package/dist/partials/imagesFor.js +43 -43
- package/dist/partials/jsdocDocsFor.js +155 -0
- package/dist/partials/neostandardLint.js +121 -121
- package/dist/partials/readmeTemplate.js +15 -15
- package/dist/partials/runOnChange.js +29 -29
- package/dist/partials/sassFor.js +29 -29
- package/dist/partials/tsFor.js +71 -71
- package/dist/partials/typeDocsFor.js +203 -203
- package/dist/sourceLint.js +26 -26
- package/dist/test-helpers/neostandardLintWithRealNeostandard.js +49 -49
- package/dist/test-helpers/setUp.js +95 -95
- package/dist/testFull.js +20 -20
- package/dist/testHelpers.js +10 -10
- package/dist/testQuick.js +22 -22
- package/dist/utilities/dotNotate.js +48 -48
- package/dist/utilities/getBundleConfigs.js +28 -28
- package/dist/watchTest.js +16 -16
- package/functions/build.mjs +7 -2
- package/functions/build.test.mjs +50 -1
- package/functions/copyFiles.mjs +32 -0
- package/functions/copyFiles.test.mjs +78 -0
- package/functions/jsdocDocs.mjs +10 -0
- package/functions/partials/copyFor.mjs +4 -1
- package/functions/partials/jsdocDocsFor.mjs +132 -0
- package/functions/partials/jsdocDocsFor.test.mjs +101 -0
- package/gulp.config.mjs +28 -5
- package/gulpfile.base.mjs +2 -0
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -11,7 +11,9 @@ Using this tool suite, you can:
|
|
|
11
11
|
* Bundle your distribution files to be used in a browser environment.
|
|
12
12
|
* Run tests and watch for changes.
|
|
13
13
|
* Generate jsdoc readme files.
|
|
14
|
-
* Generate HTML documentation straight from your
|
|
14
|
+
* Generate real HTML documentation straight from your source - TypeDoc for a TypeScript project (a module for
|
|
15
|
+
each of your folders), or jsdoc with a modern theme for a plain JavaScript one.
|
|
16
|
+
* Copy files (a bundle, or anything else) to another location, on demand.
|
|
15
17
|
|
|
16
18
|
## Installation
|
|
17
19
|
|
|
@@ -281,10 +283,12 @@ module.exports = {
|
|
|
281
283
|
}
|
|
282
284
|
```
|
|
283
285
|
|
|
284
|
-
### Configure HTML JS Documentation (optional)
|
|
286
|
+
### Configure HTML JS Documentation, full manual control (optional, advanced)
|
|
285
287
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
For most projects, `docs.enabled` with `docs.method: 'jsdoc'` (see 'Configure HTML documentation' below) is the
|
|
289
|
+
simpler path - no `.jsdoc.conf.js` file to maintain by hand, wired straight into `gulp build`/`gulp docs`. This
|
|
290
|
+
section is for when you want full, direct control over jsdoc's own config instead (a plugin or option this
|
|
291
|
+
project's own generated config does not expose, for example).
|
|
288
292
|
|
|
289
293
|
Create a `.jsdoc.conf.js` file and add the following:
|
|
290
294
|
|
|
@@ -376,6 +380,33 @@ exports if you want it documented this cleanly:
|
|
|
376
380
|
}
|
|
377
381
|
```
|
|
378
382
|
|
|
383
|
+
### Configure copy files (optional)
|
|
384
|
+
|
|
385
|
+
Copy files (a bundle, or anything else) to another location - any number of entries, each independent. Unlike
|
|
386
|
+
every other task here, this is never run automatically as part of `gulp build` - what this copies is often the
|
|
387
|
+
live, publicly-reachable version of something, so publishing it should be a deliberate step your own script
|
|
388
|
+
opts into, not a side effect of a routine local build.
|
|
389
|
+
|
|
390
|
+
Add the following to the exports in your `build-tools.config.json`:
|
|
391
|
+
|
|
392
|
+
```json
|
|
393
|
+
{
|
|
394
|
+
"copyFiles": [
|
|
395
|
+
{
|
|
396
|
+
// The glob pattern(s) of files to copy
|
|
397
|
+
"from": "browser/**/*.js",
|
|
398
|
+
// The directory to copy them into
|
|
399
|
+
"to": "../my-other-project/vendor",
|
|
400
|
+
// Optional - preserves this glob's own subdirectory structure in the destination, instead of flattening it
|
|
401
|
+
"base": "browser"
|
|
402
|
+
}
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
If you also export `copyFiles` from your gulpfile you can run it on its own with `gulp copyFiles`, and can then
|
|
408
|
+
add your own script for it, for example `"publish:bundle": "gulp copyFiles"`.
|
|
409
|
+
|
|
379
410
|
### Configure move fonts (optional)
|
|
380
411
|
|
|
381
412
|
Be able to copy a source directory of fonts into the distribution path.
|
|
@@ -498,32 +529,46 @@ babelConfig.presets.push('@babel/preset-typescript')
|
|
|
498
529
|
module.exports = babelConfig
|
|
499
530
|
```
|
|
500
531
|
|
|
501
|
-
### Configure
|
|
502
|
-
|
|
503
|
-
`jsdoc-to-markdown` only reads `.js` files, so the types in your `.ts` files (and the
|
|
504
|
-
the readme it generates
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
532
|
+
### Configure HTML documentation (optional)
|
|
533
|
+
|
|
534
|
+
`jsdoc-to-markdown` (the readme generator) only reads `.js` files, so the types in your `.ts` files (and the
|
|
535
|
+
comments on them) never reach the readme it generates, and even for a plain JavaScript project a single
|
|
536
|
+
markdown readme is a thinner result than a real browsable site. Instead, `docs.enabled` generates real HTML
|
|
537
|
+
documentation straight from your source, with either engine:
|
|
538
|
+
|
|
539
|
+
* **TypeDoc** (for a TypeScript project) - every folder in your source directory becomes a module of the
|
|
540
|
+
documentation, the default export of each file (one function per file) is listed under the name of the file,
|
|
541
|
+
and everything else a file exports (for example the types in a `types.ts`) is listed as it is. Index files,
|
|
542
|
+
tests and declaration files are left out. A file which sits directly in the source directory, beside the
|
|
543
|
+
folders, is a module of its own (unless it is `index` or `main`). The first comment of a folder's `index.ts`
|
|
544
|
+
(or the header comment of such a file) describes its module. The comments on your code are the documentation,
|
|
545
|
+
and the types come from the code itself, so `@module`, `@memberOf`, `@typedef` and the `{Type}` of `@param`
|
|
546
|
+
are not needed. `typedoc` is an optional peer dependency (like `typescript`), install it in your project with
|
|
547
|
+
`npm install --save-dev typedoc` (this needs a `typescript` version it supports).
|
|
548
|
+
* **jsdoc** (for a plain JavaScript project, where TypeDoc has no real types to read) - scans your source
|
|
549
|
+
recursively with jsdoc itself, rendered with a modern theme (`clean-jsdoc-theme` by default, used instead of
|
|
550
|
+
jsdoc's own classic default template) instead of the manual `.jsdoc.conf.js` setup described further below.
|
|
551
|
+
`jsdoc` and whichever theme you configure are optional peer dependencies, install them with
|
|
552
|
+
`npm install --save-dev jsdoc clean-jsdoc-theme` (or your own chosen theme package).
|
|
515
553
|
|
|
516
554
|
Add the following to the exports in your `build-tools.config.json`:
|
|
517
555
|
|
|
518
556
|
```json
|
|
519
557
|
{
|
|
520
558
|
"docs": {
|
|
521
|
-
// Generate the documentation from the
|
|
559
|
+
// Generate the documentation from the source
|
|
522
560
|
"enabled": true,
|
|
523
|
-
// The directory holding the
|
|
561
|
+
// The directory holding the source, each folder in it becomes a module (TypeDoc) or is scanned recursively (jsdoc)
|
|
524
562
|
"from": "src",
|
|
525
563
|
// The markdown file used as the front page of the documentation (a short overview of your project)
|
|
526
564
|
"index": "MAIN.md",
|
|
565
|
+
// 'typedoc' or 'jsdoc'. Left out (or false), it's inferred from typescript.enabled - 'typedoc' when your
|
|
566
|
+
// project is TypeScript, 'jsdoc' when it is not - so most projects never need to set this at all. Set it
|
|
567
|
+
// explicitly to override that inference either way.
|
|
568
|
+
"method": false,
|
|
569
|
+
// Only meaningful when method is (or resolves to) 'jsdoc' - the theme package to render with. TypeDoc
|
|
570
|
+
// always keeps its own default regardless of this setting.
|
|
571
|
+
"theme": "clean-jsdoc-theme",
|
|
527
572
|
// Where the HTML is generated (the directory is cleared first)
|
|
528
573
|
"to": "docs"
|
|
529
574
|
}
|
|
@@ -569,6 +614,7 @@ In your `package.json` file, add the following scripts:
|
|
|
569
614
|
"dev": "gulp",
|
|
570
615
|
"docs": "gulp docs",
|
|
571
616
|
"htmldocs": "jsdoc -R MAIN.md -c ./.jsdoc.conf.js -d docs",
|
|
617
|
+
"publish:bundle": "gulp copyFiles",
|
|
572
618
|
"readme": "gulp readme",
|
|
573
619
|
"sass": "gulp sass",
|
|
574
620
|
"test": "gulp testFull",
|
|
@@ -629,6 +675,7 @@ Modify these configurations to match your project specifications.
|
|
|
629
675
|
* [~JestTestFlags](#module_gulpConfig..JestTestFlags) : <code>FlagsSetting</code>
|
|
630
676
|
* [~StringSetting](#module_gulpConfig..StringSetting) : <code>string</code>
|
|
631
677
|
* [~Setting](#module_gulpConfig..Setting) : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
|
|
678
|
+
* [~CopyFilesEntry](#module_gulpConfig..CopyFilesEntry) : <code>Object</code>
|
|
632
679
|
* [~BrowserConfig](#module_gulpConfig..BrowserConfig) : <code>Object.<string, Setting></code>
|
|
633
680
|
* [~AdditionalBundleConfig](#module_gulpConfig..AdditionalBundleConfig) : <code>Object.<string, Setting></code>
|
|
634
681
|
* [~DistConfig](#module_gulpConfig..DistConfig) : <code>Object.<string, Setting></code>
|
|
@@ -722,6 +769,20 @@ A setting that may only be a string.
|
|
|
722
769
|
Any single configuration option is a Setting.
|
|
723
770
|
|
|
724
771
|
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
772
|
+
<a name="module_gulpConfig..CopyFilesEntry"></a>
|
|
773
|
+
|
|
774
|
+
### gulpConfig~CopyFilesEntry : <code>Object</code>
|
|
775
|
+
One copy-files entry: a glob (or array of globs) to copy, and where to copy it.
|
|
776
|
+
|
|
777
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
778
|
+
**Properties**
|
|
779
|
+
|
|
780
|
+
| Name | Type | Description |
|
|
781
|
+
| --- | --- | --- |
|
|
782
|
+
| from | <code>ArrayableSetting</code> | The glob pattern(s) of files to copy. |
|
|
783
|
+
| to | <code>StringSetting</code> | The directory to copy them into. |
|
|
784
|
+
| base | <code>FlagStringSetting</code> | Optional base for gulp's own src(pattern, {base}), to preserve a glob's own subdirectory structure in the destination instead of flattening it. false (the default) uses gulp's own default base behaviour. |
|
|
785
|
+
|
|
725
786
|
<a name="module_gulpConfig..BrowserConfig"></a>
|
|
726
787
|
|
|
727
788
|
### gulpConfig~BrowserConfig : <code>Object.<string, Setting></code>
|
|
@@ -829,20 +890,22 @@ Configurations to compile and generate the Readme file.
|
|
|
829
890
|
<a name="module_gulpConfig..DocsConfig"></a>
|
|
830
891
|
|
|
831
892
|
### gulpConfig~DocsConfig : <code>Object.<string, Setting></code>
|
|
832
|
-
Configurations for generating the HTML documentation of a
|
|
893
|
+
Configurations for generating the HTML documentation of a project's own source, with either TypeDoc (real
|
|
833
894
|
|
|
834
895
|
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
835
896
|
**Properties**
|
|
836
897
|
|
|
837
898
|
| Name | Type | Description |
|
|
838
899
|
| --- | --- | --- |
|
|
839
|
-
| enabled | <code>BooleanSetting</code> | Toggle generating the documentation from the
|
|
840
|
-
| from | <code>StringSetting</code> | The directory holding the
|
|
900
|
+
| enabled | <code>BooleanSetting</code> | Toggle generating the documentation from the source. When it is on the build does this instead of generating the readme from the jsdoc comments of the compiled files. |
|
|
901
|
+
| from | <code>StringSetting</code> | The directory holding the source, each folder in it becomes a module (TypeDoc) or is scanned recursively (jsdoc). |
|
|
841
902
|
| index | <code>StringSetting</code> | The markdown file used as the front page of the documentation. |
|
|
842
|
-
| logLevel | <code>StringSetting</code> | How much TypeDoc reports: Verbose, Info, Warn, Error or None. |
|
|
903
|
+
| logLevel | <code>StringSetting</code> | How much TypeDoc reports: Verbose, Info, Warn, Error or None. Not used by jsdoc. |
|
|
904
|
+
| method | <code>FlagStringSetting</code> | 'typedoc' or 'jsdoc'. False (the default) infers it from typescript.enabled - 'typedoc' when on, 'jsdoc' when off - so an existing TypeScript project's config needs no change to keep working exactly as it already does; set this explicitly to override that inference either way. |
|
|
905
|
+
| theme | <code>StringSetting</code> | The jsdoc theme package to use (only meaningful when method is 'jsdoc' - TypeDoc keeps its own default regardless). Defaults to 'clean-jsdoc-theme'. |
|
|
843
906
|
| title | <code>StringSetting</code> | The name of the documentation, defaults to the name in the package.json. |
|
|
844
907
|
| to | <code>StringSetting</code> | The directory to generate the documentation in (it is cleared first). |
|
|
845
|
-
| tsconfig | <code>FlagStringSetting</code> | The tsconfig file to read the source with, defaults to the one of typescript.config. |
|
|
908
|
+
| tsconfig | <code>FlagStringSetting</code> | The tsconfig file to read the source with (TypeDoc only), defaults to the one of typescript.config. |
|
|
846
909
|
|
|
847
910
|
<a name="module_gulpConfig..SassConfig"></a>
|
|
848
911
|
|
|
@@ -900,6 +963,7 @@ A set of Configurations options defined by Settings.
|
|
|
900
963
|
| --- | --- | --- |
|
|
901
964
|
| browser | <code>BrowserConfig</code> | Browser bundling configuration group. |
|
|
902
965
|
| cleanPaths | <code>ArrayableSetting</code> | The paths for directories to delete before build. |
|
|
966
|
+
| copyFiles | <code>Array.<CopyFilesEntry></code> | Files to copy elsewhere, run via the copyFiles task - never automatically as part of build, since what this copies is often the live, publicly-reachable version of something (e.g. a bundle), and publishing it should be a deliberate step. |
|
|
903
967
|
| dist | <code>DistConfig</code> | Distribution file generation configuration group. |
|
|
904
968
|
| docs | <code>DocsConfig</code> | Generate the documentation of a TypeScript project configuration group. |
|
|
905
969
|
| fonts | <code>FontConfig</code> | Fonts copy configuration group. |
|
package/dist/build.js
CHANGED
|
@@ -1,70 +1,75 @@
|
|
|
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.build = void 0;
|
|
8
|
-
var _bundle = require("./bundle.js");
|
|
9
|
-
var _bundleMinify = require("./bundleMinify.js");
|
|
10
|
-
var _partials = require("./partials.js");
|
|
11
|
-
var _compileReadme = require("./compileReadme.js");
|
|
12
|
-
var _typeDocs = require("./typeDocs.js");
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
|
|
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.build = void 0;
|
|
8
|
+
var _bundle = require("./bundle.js");
|
|
9
|
+
var _bundleMinify = require("./bundleMinify.js");
|
|
10
|
+
var _partials = require("./partials.js");
|
|
11
|
+
var _compileReadme = require("./compileReadme.js");
|
|
12
|
+
var _typeDocs = require("./typeDocs.js");
|
|
13
|
+
var _jsdocDocs = require("./jsdocDocs.js");
|
|
14
|
+
var _distMinify = require("./distMinify.js");
|
|
15
|
+
var _sourceLint = require("./sourceLint.js");
|
|
16
|
+
var _gulp = require("gulp");
|
|
17
|
+
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
18
|
+
var _copyFonts = require("./copyFonts.js");
|
|
19
|
+
var _images = require("./images.js");
|
|
20
|
+
var _sass = require("./sass.js");
|
|
21
|
+
var _testFull = require("./testFull.js");
|
|
22
|
+
var cache;
|
|
23
|
+
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; }
|
|
23
24
|
/**
|
|
24
25
|
* Runs several processes to build and validate the project.
|
|
25
26
|
* Cleans and lints the source, distributes and minifies, bundles and minifies, creates the readme, then runs the
|
|
26
27
|
* tests.
|
|
27
28
|
* @memberOf module:js-build-tools
|
|
28
29
|
* @returns {stream.Stream}
|
|
29
|
-
*/
|
|
30
|
-
const build = (done = null) => {
|
|
31
|
-
const buildActions = [(0, _partials.distSeries)(), _distMinify.distMinify];
|
|
32
|
-
const generateDocs = gulpConfig.get('docs.enabled');
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (gulpConfig.get('
|
|
41
|
-
//
|
|
42
|
-
buildActions.push(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (gulpConfig.get('
|
|
56
|
-
// Conditionally add
|
|
57
|
-
runActions.push(
|
|
58
|
-
}
|
|
59
|
-
if (gulpConfig.get('
|
|
60
|
-
// Conditionally add
|
|
61
|
-
runActions.push(
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
30
|
+
*/
|
|
31
|
+
const build = (done = null) => {
|
|
32
|
+
const buildActions = [(0, _partials.distSeries)(), _distMinify.distMinify];
|
|
33
|
+
const generateDocs = gulpConfig.get('docs.enabled');
|
|
34
|
+
// docs.method picks the engine explicitly; left unset (false, the default), it's inferred from
|
|
35
|
+
// typescript.enabled - every existing TypeScript project's config, which never sets method, keeps producing
|
|
36
|
+
// TypeDoc output exactly as it always has.
|
|
37
|
+
const docsMethod = gulpConfig.get('docs.method') || (gulpConfig.get('typescript.enabled') ? 'typedoc' : 'jsdoc');
|
|
38
|
+
if (generateDocs) {
|
|
39
|
+
// The documentation is generated from the source itself, the readme is written by hand
|
|
40
|
+
buildActions.push(docsMethod === 'jsdoc' ? _jsdocDocs.jsdocDocs : _typeDocs.typeDocs);
|
|
41
|
+
} else if (gulpConfig.get('typescript.enabled')) {
|
|
42
|
+
// For ts usage, we need to run the readme on the dist directly since that is where the .js files are located
|
|
43
|
+
buildActions.push(_compileReadme.compileReadme);
|
|
44
|
+
}
|
|
45
|
+
if (gulpConfig.get('browser.enabled')) {
|
|
46
|
+
// If not 'nodeOnly' then we also want to bundle for browser after we complete the dist directory
|
|
47
|
+
buildActions.push(_bundle.bundle);
|
|
48
|
+
buildActions.push(_bundleMinify.bundleMinify);
|
|
49
|
+
}
|
|
50
|
+
const runActions = [(0, _gulp.series)(...buildActions)];
|
|
51
|
+
if (!generateDocs && !gulpConfig.get('typescript.enabled')) {
|
|
52
|
+
// Since we didn't run this in series after dist because of typescript, we need to run it now. Potentially faster here.
|
|
53
|
+
runActions.push(_compileReadme.compileReadme);
|
|
54
|
+
}
|
|
55
|
+
runActions.push(_testFull.testFull);
|
|
56
|
+
if (gulpConfig.get('fonts.enabled')) {
|
|
57
|
+
// Conditionally add Fonts process
|
|
58
|
+
runActions.push(_copyFonts.copyFonts);
|
|
59
|
+
}
|
|
60
|
+
if (gulpConfig.get('images.enabled')) {
|
|
61
|
+
// Conditionally add Images process
|
|
62
|
+
runActions.push(_images.images);
|
|
63
|
+
}
|
|
64
|
+
if (gulpConfig.get('sass.enabled')) {
|
|
65
|
+
// Conditionally add SASS process
|
|
66
|
+
runActions.push(_sass.sass);
|
|
67
|
+
}
|
|
68
|
+
// clean has to finish before anything writes into the output folders - images, fonts and sass all write into
|
|
69
|
+
// browser/, so running clean in parallel with them races (ENOTEMPTY errors from clean, or output deleted mid-write).
|
|
70
|
+
// sourceLint fixes the real source in place before anything compiles from it (distSeries, tsFor inside it), so a
|
|
71
|
+
// build never reads a mix of pre- and post-fix content; clean only touches dist/browser output, so the two can
|
|
72
|
+
// run alongside each other.
|
|
73
|
+
return (0, _gulp.series)((0, _gulp.parallel)(_partials.clean, _sourceLint.sourceLint), (0, _gulp.parallel)(...runActions))(done);
|
|
74
|
+
};
|
|
70
75
|
exports.build = build;
|
package/dist/build.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.build=void 0;var cache,_bundle=require("./bundle.js"),_bundleMinify=require("./bundleMinify.js"),_partials=require("./partials.js"),_compileReadme=require("./compileReadme.js"),_typeDocs=require("./typeDocs.js"),_distMinify=require("./distMinify.js"),_sourceLint=require("./sourceLint.js"),_gulp=require("gulp"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_copyFonts=require("./copyFonts.js"),_images=require("./images.js"),_sass=require("./sass.js"),_testFull=require("./testFull.js");function _interopRequireWildcard(e,s){if(!s&&e&&e.__esModule)return e;var i,r
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=void 0;var cache,_bundle=require("./bundle.js"),_bundleMinify=require("./bundleMinify.js"),_partials=require("./partials.js"),_compileReadme=require("./compileReadme.js"),_typeDocs=require("./typeDocs.js"),_jsdocDocs=require("./jsdocDocs.js"),_distMinify=require("./distMinify.js"),_sourceLint=require("./sourceLint.js"),_gulp=require("gulp"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_copyFonts=require("./copyFonts.js"),_images=require("./images.js"),_sass=require("./sass.js"),_testFull=require("./testFull.js");function _interopRequireWildcard(e,s){if(!s&&e&&e.__esModule)return e;var i,t,r=Object.defineProperty,l={__proto__:null,default:e};if(Object(e)!==e)return l;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,l)}for(t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=r&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?r(l,t,i):l[t]=e[t]);return l}const build=(e=null)=>{const s=[(0,_partials.distSeries)(),_distMinify.distMinify],i=gulpConfig.get("docs.enabled"),t=gulpConfig.get("docs.method")||(gulpConfig.get("typescript.enabled")?"typedoc":"jsdoc");i?s.push("jsdoc"===t?_jsdocDocs.jsdocDocs:_typeDocs.typeDocs):gulpConfig.get("typescript.enabled")&&s.push(_compileReadme.compileReadme),gulpConfig.get("browser.enabled")&&(s.push(_bundle.bundle),s.push(_bundleMinify.bundleMinify));const r=[(0,_gulp.series)(...s)];return i||gulpConfig.get("typescript.enabled")||r.push(_compileReadme.compileReadme),r.push(_testFull.testFull),gulpConfig.get("fonts.enabled")&&r.push(_copyFonts.copyFonts),gulpConfig.get("images.enabled")&&r.push(_images.images),gulpConfig.get("sass.enabled")&&r.push(_sass.sass),(0,_gulp.series)((0,_gulp.parallel)(_partials.clean,_sourceLint.sourceLint),(0,_gulp.parallel)(...r))(e)};exports.build=build;
|
package/dist/bundle.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
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.bundle = void 0;
|
|
8
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
9
|
-
require("core-js/modules/esnext.iterator.map.js");
|
|
10
|
-
var _browserify = _interopRequireDefault(require("browserify"));
|
|
11
|
-
var _gulp = require("gulp");
|
|
12
|
-
var _mergeStream = _interopRequireDefault(require("merge-stream"));
|
|
13
|
-
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
14
|
-
var _vinylSourceStream = _interopRequireDefault(require("vinyl-source-stream"));
|
|
15
|
-
var _getBundleConfigs = require("./utilities/getBundleConfigs.js");
|
|
16
|
-
var cache;
|
|
17
|
-
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; }
|
|
18
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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.bundle = void 0;
|
|
8
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
9
|
+
require("core-js/modules/esnext.iterator.map.js");
|
|
10
|
+
var _browserify = _interopRequireDefault(require("browserify"));
|
|
11
|
+
var _gulp = require("gulp");
|
|
12
|
+
var _mergeStream = _interopRequireDefault(require("merge-stream"));
|
|
13
|
+
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
14
|
+
var _vinylSourceStream = _interopRequireDefault(require("vinyl-source-stream"));
|
|
15
|
+
var _getBundleConfigs = require("./utilities/getBundleConfigs.js");
|
|
16
|
+
var cache;
|
|
17
|
+
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; }
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
19
|
/**
|
|
20
20
|
* Starting at each bundle's own entry point (dist.main for the primary bundle, or its own
|
|
21
21
|
* override from browser.bundles), bundle all the reachable files into a single file per bundle and
|
|
@@ -35,26 +35,26 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
35
35
|
* code must not require it, or provide it another way, such as a separate script tag).
|
|
36
36
|
* @memberOf module:js-build-tools
|
|
37
37
|
* @returns {stream.Stream}
|
|
38
|
-
*/
|
|
39
|
-
const bundle = () => (0, _mergeStream.default)((0, _getBundleConfigs.getBundleConfigs)().map(({
|
|
40
|
-
name,
|
|
41
|
-
main,
|
|
42
|
-
ignore,
|
|
43
|
-
exclude
|
|
44
|
-
}) => {
|
|
45
|
-
const bundler = (0, _browserify.default)(main, {
|
|
46
|
-
standalone: name
|
|
47
|
-
});
|
|
48
|
-
if (ignore.length) {
|
|
49
|
-
bundler.ignore(ignore);
|
|
50
|
-
}
|
|
51
|
-
if (exclude.length) {
|
|
52
|
-
bundler.exclude(exclude);
|
|
53
|
-
}
|
|
54
|
-
return bundler.bundle().pipe((0, _vinylSourceStream.default)(`${name}.js`));
|
|
55
|
-
})
|
|
56
|
-
// One shared dest() for every bundle, not one per bundle - vinyl-fs's dest() races against
|
|
57
|
-
// itself (a real "write after end" failure) when two separate dest() streams target the same
|
|
58
|
-
// directory concurrently, which every additional bundle's own dest() call otherwise would.
|
|
59
|
-
).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')));
|
|
38
|
+
*/
|
|
39
|
+
const bundle = () => (0, _mergeStream.default)((0, _getBundleConfigs.getBundleConfigs)().map(({
|
|
40
|
+
name,
|
|
41
|
+
main,
|
|
42
|
+
ignore,
|
|
43
|
+
exclude
|
|
44
|
+
}) => {
|
|
45
|
+
const bundler = (0, _browserify.default)(main, {
|
|
46
|
+
standalone: name
|
|
47
|
+
});
|
|
48
|
+
if (ignore.length) {
|
|
49
|
+
bundler.ignore(ignore);
|
|
50
|
+
}
|
|
51
|
+
if (exclude.length) {
|
|
52
|
+
bundler.exclude(exclude);
|
|
53
|
+
}
|
|
54
|
+
return bundler.bundle().pipe((0, _vinylSourceStream.default)(`${name}.js`));
|
|
55
|
+
})
|
|
56
|
+
// One shared dest() for every bundle, not one per bundle - vinyl-fs's dest() races against
|
|
57
|
+
// itself (a real "write after end" failure) when two separate dest() streams target the same
|
|
58
|
+
// directory concurrently, which every additional bundle's own dest() call otherwise would.
|
|
59
|
+
).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')));
|
|
60
60
|
exports.bundle = bundle;
|
package/dist/bundleMinify.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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.bundleMinify = 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
|
-
var _minifyFor = require("./partials/minifyFor.js");
|
|
12
|
-
var _getBundleConfigs = require("./utilities/getBundleConfigs.js");
|
|
13
|
-
var cache;
|
|
14
|
-
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; }
|
|
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.bundleMinify = 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
|
+
var _minifyFor = require("./partials/minifyFor.js");
|
|
12
|
+
var _getBundleConfigs = require("./utilities/getBundleConfigs.js");
|
|
13
|
+
var cache;
|
|
14
|
+
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; }
|
|
15
15
|
/**
|
|
16
16
|
* Creates the minified file for every bundle (the primary bundle, plus any additional ones from
|
|
17
17
|
* browser.bundles). The minify step itself never varies per bundle, so this is one shared
|
|
@@ -19,8 +19,8 @@ function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e;
|
|
|
19
19
|
* pipeline per bundle - gulp's src() accepts an array of paths natively.
|
|
20
20
|
* @memberOf module:js-build-tools
|
|
21
21
|
* @returns {*}
|
|
22
|
-
*/
|
|
23
|
-
const bundleMinify = () => (0, _minifyFor.minifyFor)((0, _getBundleConfigs.getBundleConfigs)().map(({
|
|
24
|
-
name
|
|
25
|
-
}) => `${gulpConfig.get('browser.to')}/${name}.js`), gulpConfig.get('browser.to'));
|
|
22
|
+
*/
|
|
23
|
+
const bundleMinify = () => (0, _minifyFor.minifyFor)((0, _getBundleConfigs.getBundleConfigs)().map(({
|
|
24
|
+
name
|
|
25
|
+
}) => `${gulpConfig.get('browser.to')}/${name}.js`), gulpConfig.get('browser.to'));
|
|
26
26
|
exports.bundleMinify = bundleMinify;
|
|
@@ -0,0 +1,47 @@
|
|
|
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.copyFiles = void 0;
|
|
8
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
9
|
+
require("core-js/modules/esnext.iterator.map.js");
|
|
10
|
+
var _copyFor = require("./partials/copyFor.js");
|
|
11
|
+
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
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; }
|
|
14
|
+
/**
|
|
15
|
+
* Copy files from one place to another - any number of { from, to, base? } entries, configured via copyFiles.
|
|
16
|
+
* A project with no copyFiles entries gets a task that does nothing. Meant to be run explicitly (its own script,
|
|
17
|
+
* e.g. `gulp copyFiles`), not folded into the default build - a bundle (or any other file this copies) is often
|
|
18
|
+
* the live, publicly-reachable version of something, so publishing it elsewhere should be a deliberate step, not
|
|
19
|
+
* a side effect of every routine local build.
|
|
20
|
+
*
|
|
21
|
+
* Reuses copyFor (already shared with copyFonts) rather than a fresh src()/dest() pair - that keeps its existing
|
|
22
|
+
* encoding: false fix (Gulp 5's default utf8 handling corrupts binary files such as fonts or a minified bundle)
|
|
23
|
+
* instead of silently losing it in a parallel implementation.
|
|
24
|
+
*
|
|
25
|
+
* Each entry runs as its own independent copyFor(), awaited via Promise.all rather than merged into one combined
|
|
26
|
+
* stream (mergeStream, the pattern bundle.mjs uses) - that pattern assumes every merged stream ends up at the
|
|
27
|
+
* same shared destination; here, each entry can have a genuinely different one, and merging streams that each
|
|
28
|
+
* already terminate at their own separate dest() hit a real "write after end" error in practice.
|
|
29
|
+
* @memberOf module:js-build-tools
|
|
30
|
+
* @returns {Promise<void>}
|
|
31
|
+
*/
|
|
32
|
+
const copyFiles = () => {
|
|
33
|
+
const copies = gulpConfig.get('copyFiles', []);
|
|
34
|
+
if (!copies.length) {
|
|
35
|
+
return Promise.resolve();
|
|
36
|
+
}
|
|
37
|
+
return Promise.all(copies.map(({
|
|
38
|
+
from,
|
|
39
|
+
to,
|
|
40
|
+
base
|
|
41
|
+
}) => new Promise((resolve, reject) => {
|
|
42
|
+
(0, _copyFor.copyFor)(from, to, {
|
|
43
|
+
base
|
|
44
|
+
}).on('finish', resolve).on('error', reject);
|
|
45
|
+
}))).then(() => {});
|
|
46
|
+
};
|
|
47
|
+
exports.copyFiles = copyFiles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.copyFiles=void 0,require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.map.js");var cache,_copyFor=require("./partials/copyFor.js"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js"));function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;var o,t,c=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(t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=c&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?c(s,t,o):s[t]=e[t]);return s}const copyFiles=()=>{const e=gulpConfig.get("copyFiles",[]);return e.length?Promise.all(e.map(({from:e,to:r,base:o})=>new Promise((t,c)=>{(0,_copyFor.copyFor)(e,r,{base:o}).on("finish",t).on("error",c)}))).then(()=>{}):Promise.resolve()};exports.copyFiles=copyFiles;
|
package/dist/copyFonts.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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.copyFonts = void 0;
|
|
8
|
-
var _copyFor = require("./partials/copyFor.js");
|
|
9
|
-
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
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; }
|
|
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.copyFonts = void 0;
|
|
8
|
+
var _copyFor = require("./partials/copyFor.js");
|
|
9
|
+
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
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; }
|
|
12
12
|
/**
|
|
13
13
|
* Move the font files into the browser directory.
|
|
14
14
|
* @memberOf module:js-build-tools
|
|
15
15
|
* @return {stream.Stream}
|
|
16
|
-
*/
|
|
17
|
-
const copyFonts = () => (0, _copyFor.copyFor)(gulpConfig.get('fonts.from'), gulpConfig.get('fonts.to'));
|
|
16
|
+
*/
|
|
17
|
+
const copyFonts = () => (0, _copyFor.copyFor)(gulpConfig.get('fonts.from'), gulpConfig.get('fonts.to'));
|
|
18
18
|
exports.copyFonts = copyFonts;
|
package/dist/default.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
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.defaultCmd = void 0;
|
|
8
|
-
var _dist = require("./dist.js");
|
|
9
|
-
var _bundle = require("./bundle.js");
|
|
10
|
-
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
11
|
-
var _gulp = require("gulp");
|
|
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; }
|
|
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.defaultCmd = void 0;
|
|
8
|
+
var _dist = require("./dist.js");
|
|
9
|
+
var _bundle = require("./bundle.js");
|
|
10
|
+
var gulpConfig = _interopRequireWildcard(require("../gulp.config.js"));
|
|
11
|
+
var _gulp = require("gulp");
|
|
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; }
|
|
14
14
|
/**
|
|
15
15
|
* Recommended as the default task, runs the simple dist and bundle tasks.
|
|
16
16
|
* @memberOf module:js-build-tools
|
|
17
17
|
* @param {function} [done=null]
|
|
18
18
|
* @returns {stream.Stream}
|
|
19
|
-
*/
|
|
20
|
-
const defaultCmd = (done = null) => gulpConfig.get('browser.enabled') ? (0, _gulp.series)(_dist.dist, _bundle.bundle)(done) : (0, _gulp.series)(_dist.dist)(done);
|
|
19
|
+
*/
|
|
20
|
+
const defaultCmd = (done = null) => gulpConfig.get('browser.enabled') ? (0, _gulp.series)(_dist.dist, _bundle.bundle)(done) : (0, _gulp.series)(_dist.dist)(done);
|
|
21
21
|
exports.defaultCmd = defaultCmd;
|