js-build-tools 5.1.1 → 5.3.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 +348 -284
- package/dist/build.js +7 -2
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +32 -16
- package/dist/bundle.min.js +1 -1
- package/dist/bundleLint.js +16 -16
- package/dist/bundleMinify.js +13 -13
- package/dist/compileReadme.js +10 -10
- package/dist/copyFonts.js +13 -13
- package/dist/default.js +15 -15
- package/dist/dist.js +10 -10
- package/dist/distLint.js +16 -16
- package/dist/distMinify.js +13 -13
- package/dist/images.js +10 -10
- package/dist/partials/addToReadme.js +17 -17
- package/dist/partials/beginWatcher.js +12 -12
- package/dist/partials/clean.js +14 -14
- package/dist/partials/copyFor.js +12 -12
- package/dist/partials/distFor.js +21 -21
- package/dist/partials/distForSrc.js +11 -11
- package/dist/partials/distSeries.js +19 -19
- package/dist/partials/imagesFor.js +48 -48
- package/dist/partials/minifyFor.js +16 -16
- package/dist/partials/readmeTemplate.js +14 -14
- package/dist/partials/removeDirectory.js +29 -29
- package/dist/partials/runOnChange.js +28 -28
- package/dist/partials/sassFor.js +28 -28
- package/dist/partials/standardLint.js +75 -75
- package/dist/partials/tsFor.js +82 -82
- package/dist/partials/typeDocsFor.js +214 -0
- package/dist/partials.js +7 -0
- package/dist/partials.min.js +1 -1
- package/dist/sass.js +10 -10
- package/dist/test-helpers/setUp.js +89 -89
- package/dist/test-helpers/standardLintWithRealStandard.js +27 -27
- package/dist/testFull.js +20 -20
- package/dist/testHelpers.js +10 -10
- package/dist/testQuick.js +22 -22
- package/dist/typeDocs.js +14 -0
- package/dist/typeDocs.min.js +1 -0
- package/dist/typeScript.js +9 -9
- package/dist/utilities/dotGet.js +46 -46
- package/dist/utilities/dotNotate.js +46 -46
- package/dist/utilities/dotSet.js +37 -37
- package/dist/utilities/isObject.js +8 -8
- package/dist/utilities/strAfter.js +11 -11
- package/dist/utilities/strBefore.js +11 -11
- package/dist/watchFull.js +10 -10
- package/dist/watchTest.js +16 -16
- package/functions/build.mjs +7 -2
- package/functions/build.test.mjs +29 -0
- package/functions/bundle.mjs +20 -4
- package/functions/bundle.test.mjs +74 -0
- package/functions/partials/typeDocsFor.mjs +194 -0
- package/functions/partials/typeDocsFor.test.mjs +183 -0
- package/functions/partials.mjs +1 -0
- package/functions/partials.test.mjs +1 -1
- package/functions/typeDocs.mjs +9 -0
- package/functions/typeDocs.test.mjs +11 -0
- package/gulp.config.mjs +32 -0
- package/gulpfile.base.js +2 -0
- package/gulpfile.base.mjs +1 -0
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ 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 TypeScript source (with TypeDoc), with a module for each of your folders.
|
|
14
15
|
|
|
15
16
|
## Installation
|
|
16
17
|
|
|
@@ -50,6 +51,23 @@ provided are the defaults):
|
|
|
50
51
|
// The output directory for the distribution files.
|
|
51
52
|
"to": "dist"
|
|
52
53
|
},
|
|
54
|
+
"docs": {
|
|
55
|
+
// Toggle generating the HTML documentation from the TypeScript source (see 'Configure TypeScript documentation').
|
|
56
|
+
// When on, the build does this instead of generating the readme from the jsdoc comments.
|
|
57
|
+
"enabled": false,
|
|
58
|
+
// The directory holding the TypeScript source, each folder in it becomes a module of the documentation.
|
|
59
|
+
"from": "src",
|
|
60
|
+
// The markdown file used as the front page of the documentation.
|
|
61
|
+
"index": "MAIN.md",
|
|
62
|
+
// How much TypeDoc reports: Verbose, Info, Warn, Error or None.
|
|
63
|
+
"logLevel": "Warn",
|
|
64
|
+
// The name of the documentation, defaults to the name in your package.json.
|
|
65
|
+
"title": "",
|
|
66
|
+
// The directory to generate the documentation in (it is cleared first).
|
|
67
|
+
"to": "docs",
|
|
68
|
+
// The tsconfig file to read the source with, false to use the one of 'typescript.config'.
|
|
69
|
+
"tsconfig": false
|
|
70
|
+
},
|
|
53
71
|
"fonts": {
|
|
54
72
|
// Toggle copy directory of fonts on
|
|
55
73
|
"enabled": false,
|
|
@@ -130,6 +148,7 @@ For example:
|
|
|
130
148
|
const {
|
|
131
149
|
build,
|
|
132
150
|
defaultCmd,
|
|
151
|
+
docs,
|
|
133
152
|
partials,
|
|
134
153
|
readme,
|
|
135
154
|
sass,
|
|
@@ -145,6 +164,7 @@ const {
|
|
|
145
164
|
// You can list your available tasks by running `gulp --tasks`.
|
|
146
165
|
exports.build = build
|
|
147
166
|
exports.default = defaultCmd
|
|
167
|
+
exports.docs = docs
|
|
148
168
|
exports.readme = readme
|
|
149
169
|
exports.sass = sass
|
|
150
170
|
exports.testFull = testFull
|
|
@@ -161,6 +181,7 @@ exports.watchTest = watchTest
|
|
|
161
181
|
export {
|
|
162
182
|
build,
|
|
163
183
|
defaultCmd,
|
|
184
|
+
docs,
|
|
164
185
|
partials,
|
|
165
186
|
readme,
|
|
166
187
|
sass,
|
|
@@ -248,6 +269,7 @@ module.exports = {
|
|
|
248
269
|
### Configure HTML JS Documentation (optional)
|
|
249
270
|
|
|
250
271
|
It may be desirable to generate HTML documentation for your JS files.
|
|
272
|
+
(For a TypeScript project, see 'Configure TypeScript documentation' instead.)
|
|
251
273
|
|
|
252
274
|
Create a `.jsdoc.conf.js` file and add the following:
|
|
253
275
|
|
|
@@ -333,21 +355,29 @@ Create a `tsconfig.json` file in your project root with the following:
|
|
|
333
355
|
|
|
334
356
|
```json
|
|
335
357
|
{
|
|
336
|
-
"
|
|
337
|
-
|
|
338
|
-
],
|
|
358
|
+
"include": ["src/**/*.ts"],
|
|
359
|
+
"exclude": ["src/**/*.test.*"],
|
|
339
360
|
"compilerOptions": {
|
|
340
|
-
"
|
|
341
|
-
"target": "
|
|
342
|
-
"
|
|
343
|
-
"
|
|
361
|
+
"strict": true,
|
|
362
|
+
"target": "es2020",
|
|
363
|
+
"module": "commonjs",
|
|
364
|
+
"moduleResolution": "node10",
|
|
365
|
+
"ignoreDeprecations": "6.0",
|
|
366
|
+
"skipLibCheck": true,
|
|
367
|
+
"esModuleInterop": true,
|
|
368
|
+
"declaration": true,
|
|
369
|
+
"types": []
|
|
344
370
|
}
|
|
345
371
|
}
|
|
346
372
|
```
|
|
347
373
|
|
|
348
|
-
The pattern for `"
|
|
349
|
-
The actual pattern used comes from `build-tools.config.json` as `'typescript.from'` setting.
|
|
350
|
-
To create the ts declaration files, you must add the `"declaration": true`.
|
|
374
|
+
The pattern for `"include"` should match your .ts files (and leave out the tests, which can stay `.test.js` files).
|
|
375
|
+
The actual pattern used to compile comes from `build-tools.config.json` as the `'typescript.from'` setting.
|
|
376
|
+
To create the ts declaration files, you must add the `"declaration": true`. The `typescript` package is an optional peer
|
|
377
|
+
dependency, install it in your project with `npm install --save-dev typescript` (versions 5.0 up to, but not including,
|
|
378
|
+
7 are supported). When you write relative imports, leave the `.js` extension off (`import a from './a'`), because
|
|
379
|
+
they stop resolving once the target is a `.ts` file. The compile only builds `.ts` files while `typescript.enabled` is
|
|
380
|
+
on, so convert a whole library at once.
|
|
351
381
|
|
|
352
382
|
Add the following to the exports in your `build-tools.config.json`:
|
|
353
383
|
|
|
@@ -382,6 +412,40 @@ babelConfig.presets.push('@babel/preset-typescript')
|
|
|
382
412
|
module.exports = babelConfig
|
|
383
413
|
```
|
|
384
414
|
|
|
415
|
+
### Configure TypeScript documentation (optional)
|
|
416
|
+
|
|
417
|
+
`jsdoc-to-markdown` only reads `.js` files, so the types in your `.ts` files (and the comments on them) do not reach
|
|
418
|
+
the readme it generates. Instead, this can generate HTML documentation straight from the TypeScript source with
|
|
419
|
+
[TypeDoc](https://typedoc.org/). Every folder in your source directory becomes a module of the documentation, the default
|
|
420
|
+
export of each file (one function per file) is listed under the name of the file, and everything else a file exports (for
|
|
421
|
+
example the types in a `types.ts`) is listed as it is. Index files, tests and declaration files are left out. The
|
|
422
|
+
comments on your code are the documentation, and the types come from the code itself, so `@module`, `@memberOf`,
|
|
423
|
+
`@typedef` and the `{Type}` of `@param` are not needed.
|
|
424
|
+
|
|
425
|
+
`typedoc` is an optional peer dependency (like `typescript`), install it in your project with
|
|
426
|
+
`npm install --save-dev typedoc` (this needs a `typescript` version it supports).
|
|
427
|
+
|
|
428
|
+
Add the following to the exports in your `build-tools.config.json`:
|
|
429
|
+
|
|
430
|
+
```json
|
|
431
|
+
{
|
|
432
|
+
"docs": {
|
|
433
|
+
// Generate the documentation from the TypeScript source
|
|
434
|
+
"enabled": true,
|
|
435
|
+
// The directory holding the TypeScript source, each folder in it becomes a module
|
|
436
|
+
"from": "src",
|
|
437
|
+
// The markdown file used as the front page of the documentation (a short overview of your project)
|
|
438
|
+
"index": "MAIN.md",
|
|
439
|
+
// Where the HTML is generated (the directory is cleared first)
|
|
440
|
+
"to": "docs"
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
While `docs.enabled` is on, `gulp build` generates the documentation instead of the readme, so your `README.md` stays
|
|
446
|
+
hand-written (a short overview which links to the documentation). If you also export `docs` from your gulpfile you can
|
|
447
|
+
run it on its own with `gulp docs`, and can then add the script `"docs": "gulp docs"`.
|
|
448
|
+
|
|
385
449
|
### Configure Scripts
|
|
386
450
|
|
|
387
451
|
In your `package.json` file, add the following scripts:
|
|
@@ -391,6 +455,7 @@ In your `package.json` file, add the following scripts:
|
|
|
391
455
|
"scripts": {
|
|
392
456
|
"build": "gulp build",
|
|
393
457
|
"dev": "gulp",
|
|
458
|
+
"docs": "gulp docs",
|
|
394
459
|
"htmldocs": "jsdoc -R MAIN.md -c ./.jsdoc.conf.js -d docs",
|
|
395
460
|
"readme": "gulp readme",
|
|
396
461
|
"sass": "gulp sass",
|
|
@@ -408,277 +473,276 @@ Run any of the above commands with `gulp` or `npm run`.
|
|
|
408
473
|
|
|
409
474
|
# Available functions documentation
|
|
410
475
|
|
|
411
|
-
## Modules
|
|
412
|
-
|
|
413
|
-
<dl>
|
|
414
|
-
<dt><a href="#module_js-build-tools">js-build-tools</a></dt>
|
|
415
|
-
<dd><p>Export these functions to your own project to customize your build pipeline.</p>
|
|
416
|
-
</dd>
|
|
417
|
-
<dt><a href="#module_gulpConfig">gulpConfig</a></dt>
|
|
418
|
-
<dd><p>Modify these configurations to match your project specifications.</p>
|
|
419
|
-
</dd>
|
|
420
|
-
</dl>
|
|
421
|
-
|
|
422
|
-
<a name="module_js-build-tools"></a>
|
|
423
|
-
|
|
424
|
-
## js-build-tools
|
|
425
|
-
Export these functions to your own project to customize your build pipeline.
|
|
426
|
-
|
|
427
|
-
**Version**: 3.0.0
|
|
428
|
-
**Author**: Joshua Heagle <joshuaheagle@gmail.com>
|
|
429
|
-
<a name="module_js-build-tools.build"></a>
|
|
430
|
-
|
|
431
|
-
### js-build-tools.build() ⇒ <code>stream.Stream</code>
|
|
432
|
-
Runs several processes to build and validate the project.
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
**
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
*
|
|
445
|
-
|
|
446
|
-
* [.
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
* [~
|
|
450
|
-
* [~
|
|
451
|
-
* [~
|
|
452
|
-
* [~
|
|
453
|
-
* [~
|
|
454
|
-
* [~
|
|
455
|
-
* [~
|
|
456
|
-
* [~
|
|
457
|
-
* [~
|
|
458
|
-
* [~
|
|
459
|
-
* [~
|
|
460
|
-
* [~
|
|
461
|
-
* [~
|
|
462
|
-
* [~
|
|
463
|
-
* [~
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
|
474
|
-
|
|
|
475
|
-
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
|
486
|
-
|
|
|
487
|
-
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
**
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
|
523
|
-
|
|
|
524
|
-
|
|
|
525
|
-
|
|
|
526
|
-
|
|
|
527
|
-
|
|
|
528
|
-
|
|
|
529
|
-
|
|
|
530
|
-
|
|
|
531
|
-
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
**
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
|
555
|
-
|
|
|
556
|
-
|
|
|
557
|
-
|
|
|
558
|
-
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
**
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
|
570
|
-
|
|
|
571
|
-
|
|
|
572
|
-
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
**
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
|
584
|
-
|
|
|
585
|
-
|
|
|
586
|
-
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
**
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
|
598
|
-
|
|
|
599
|
-
|
|
|
600
|
-
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
**
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
|
612
|
-
|
|
|
613
|
-
|
|
|
614
|
-
|
|
|
615
|
-
|
|
|
616
|
-
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
**
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
|
628
|
-
|
|
|
629
|
-
|
|
|
630
|
-
|
|
|
631
|
-
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
**
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
|
643
|
-
|
|
|
644
|
-
|
|
|
645
|
-
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
**
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
|
657
|
-
|
|
|
658
|
-
|
|
|
659
|
-
|
|
|
660
|
-
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
**
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
|
672
|
-
|
|
|
673
|
-
|
|
|
674
|
-
|
|
|
675
|
-
|
|
|
676
|
-
|
|
|
677
|
-
|
|
|
678
|
-
|
|
|
679
|
-
|
|
|
680
|
-
|
|
|
681
|
-
|
|
|
682
|
-
|
|
|
683
|
-
|
|
684
|
-
|
|
476
|
+
## Modules
|
|
477
|
+
|
|
478
|
+
<dl>
|
|
479
|
+
<dt><a href="#module_js-build-tools">js-build-tools</a></dt>
|
|
480
|
+
<dd><p>Export these functions to your own project to customize your build pipeline.</p>
|
|
481
|
+
</dd>
|
|
482
|
+
<dt><a href="#module_gulpConfig">gulpConfig</a></dt>
|
|
483
|
+
<dd><p>Modify these configurations to match your project specifications.</p>
|
|
484
|
+
</dd>
|
|
485
|
+
</dl>
|
|
486
|
+
|
|
487
|
+
<a name="module_js-build-tools"></a>
|
|
488
|
+
|
|
489
|
+
## js-build-tools
|
|
490
|
+
Export these functions to your own project to customize your build pipeline.
|
|
491
|
+
|
|
492
|
+
**Version**: 3.0.0
|
|
493
|
+
**Author**: Joshua Heagle <joshuaheagle@gmail.com>
|
|
494
|
+
<a name="module_js-build-tools.build"></a>
|
|
495
|
+
|
|
496
|
+
### js-build-tools.build() ⇒ <code>stream.Stream</code>
|
|
497
|
+
Runs several processes to build and validate the project.
|
|
498
|
+
|
|
499
|
+
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
500
|
+
<a name="module_gulpConfig"></a>
|
|
501
|
+
|
|
502
|
+
## gulpConfig
|
|
503
|
+
Modify these configurations to match your project specifications.
|
|
504
|
+
|
|
505
|
+
**Version**: 3.0.0
|
|
506
|
+
**Author**: Joshua Heagle <joshuaheagle@gmail.com>
|
|
507
|
+
|
|
508
|
+
* [gulpConfig](#module_gulpConfig)
|
|
509
|
+
* _static_
|
|
510
|
+
* [.get(path, defaultValue)](#module_gulpConfig.get) ⇒ <code>\*</code> \| <code>null</code>
|
|
511
|
+
* [.set(path, value)](#module_gulpConfig.set) ⇒ <code>\*</code>
|
|
512
|
+
* _inner_
|
|
513
|
+
* [~ArrayableSetting](#module_gulpConfig..ArrayableSetting) : <code>Array.<string></code> \| <code>string</code>
|
|
514
|
+
* [~BooleanSetting](#module_gulpConfig..BooleanSetting) : <code>boolean</code>
|
|
515
|
+
* [~FlagStringSetting](#module_gulpConfig..FlagStringSetting) : <code>false</code> \| <code>StringSetting</code>
|
|
516
|
+
* [~FlagsSetting](#module_gulpConfig..FlagsSetting) : <code>Object.<string, BooleanSetting></code>
|
|
517
|
+
* [~JestTestFlags](#module_gulpConfig..JestTestFlags) : <code>FlagsSetting</code>
|
|
518
|
+
* [~StringSetting](#module_gulpConfig..StringSetting) : <code>string</code>
|
|
519
|
+
* [~Setting](#module_gulpConfig..Setting) : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
|
|
520
|
+
* [~BrowserConfig](#module_gulpConfig..BrowserConfig) : <code>Object.<string, Setting></code>
|
|
521
|
+
* [~DistConfig](#module_gulpConfig..DistConfig) : <code>Object.<string, Setting></code>
|
|
522
|
+
* [~FontConfig](#module_gulpConfig..FontConfig) : <code>Object.<string, Setting></code>
|
|
523
|
+
* [~ImageConfig](#module_gulpConfig..ImageConfig) : <code>Object.<string, Setting></code>
|
|
524
|
+
* [~ReadmeConfig](#module_gulpConfig..ReadmeConfig) : <code>Object.<string, Setting></code>
|
|
525
|
+
* [~SassConfig](#module_gulpConfig..SassConfig) : <code>Object.<string, Setting></code>
|
|
526
|
+
* [~TestConfig](#module_gulpConfig..TestConfig) : <code>Object.<string, Setting></code>
|
|
527
|
+
* [~TsConfig](#module_gulpConfig..TsConfig) : <code>Object.<string, Setting></code>
|
|
528
|
+
* [~Configurations](#module_gulpConfig..Configurations) : <code>Object.<string, Setting></code>
|
|
529
|
+
|
|
530
|
+
<a name="module_gulpConfig.get"></a>
|
|
531
|
+
|
|
532
|
+
### gulpConfig.get(path, defaultValue) ⇒ <code>\*</code> \| <code>null</code>
|
|
533
|
+
Retrieve a value from the configurations, default may be returned.
|
|
534
|
+
|
|
535
|
+
**Kind**: static method of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
536
|
+
|
|
537
|
+
| Param | Type | Default |
|
|
538
|
+
| --- | --- | --- |
|
|
539
|
+
| path | <code>string</code> \| <code>null</code> | <code>null</code> |
|
|
540
|
+
| defaultValue | <code>\*</code> | <code></code> |
|
|
541
|
+
|
|
542
|
+
<a name="module_gulpConfig.set"></a>
|
|
543
|
+
|
|
544
|
+
### gulpConfig.set(path, value) ⇒ <code>\*</code>
|
|
545
|
+
Specify a value for the configurations to use.
|
|
546
|
+
|
|
547
|
+
**Kind**: static method of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
548
|
+
|
|
549
|
+
| Param |
|
|
550
|
+
| --- |
|
|
551
|
+
| path |
|
|
552
|
+
| value |
|
|
553
|
+
|
|
554
|
+
<a name="module_gulpConfig..ArrayableSetting"></a>
|
|
555
|
+
|
|
556
|
+
### gulpConfig~ArrayableSetting : <code>Array.<string></code> \| <code>string</code>
|
|
557
|
+
A setting that may be an array of strings or a string only.
|
|
558
|
+
|
|
559
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
560
|
+
<a name="module_gulpConfig..BooleanSetting"></a>
|
|
561
|
+
|
|
562
|
+
### gulpConfig~BooleanSetting : <code>boolean</code>
|
|
563
|
+
A setting that may be true or false.
|
|
564
|
+
|
|
565
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
566
|
+
<a name="module_gulpConfig..FlagStringSetting"></a>
|
|
567
|
+
|
|
568
|
+
### gulpConfig~FlagStringSetting : <code>false</code> \| <code>StringSetting</code>
|
|
569
|
+
A setting that may be flag 'false' or provide a StringSetting
|
|
570
|
+
|
|
571
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
572
|
+
<a name="module_gulpConfig..FlagsSetting"></a>
|
|
573
|
+
|
|
574
|
+
### gulpConfig~FlagsSetting : <code>Object.<string, BooleanSetting></code>
|
|
575
|
+
An object of boolean settings used as flags.
|
|
576
|
+
|
|
577
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
578
|
+
<a name="module_gulpConfig..JestTestFlags"></a>
|
|
579
|
+
|
|
580
|
+
### gulpConfig~JestTestFlags : <code>FlagsSetting</code>
|
|
581
|
+
Configure cli options for running Jest.
|
|
582
|
+
|
|
583
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
584
|
+
**Properties**
|
|
585
|
+
|
|
586
|
+
| Name | Type |
|
|
587
|
+
| --- | --- |
|
|
588
|
+
| clearCache | <code>BooleanSetting</code> |
|
|
589
|
+
| debug | <code>BooleanSetting</code> |
|
|
590
|
+
| ignoreProjects: | <code>BooleanSetting</code> |
|
|
591
|
+
| json | <code>BooleanSetting</code> |
|
|
592
|
+
| selectProjects | <code>BooleanSetting</code> |
|
|
593
|
+
| showConfig | <code>BooleanSetting</code> |
|
|
594
|
+
| useStderr | <code>BooleanSetting</code> |
|
|
595
|
+
| watch | <code>BooleanSetting</code> |
|
|
596
|
+
| watchAll | <code>BooleanSetting</code> |
|
|
597
|
+
|
|
598
|
+
<a name="module_gulpConfig..StringSetting"></a>
|
|
599
|
+
|
|
600
|
+
### gulpConfig~StringSetting : <code>string</code>
|
|
601
|
+
A setting that may only be a string.
|
|
602
|
+
|
|
603
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
604
|
+
<a name="module_gulpConfig..Setting"></a>
|
|
605
|
+
|
|
606
|
+
### gulpConfig~Setting : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
|
|
607
|
+
Any single configuration option is a Setting.
|
|
608
|
+
|
|
609
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
610
|
+
<a name="module_gulpConfig..BrowserConfig"></a>
|
|
611
|
+
|
|
612
|
+
### gulpConfig~BrowserConfig : <code>Object.<string, Setting></code>
|
|
613
|
+
Configurations for building the browser files.
|
|
614
|
+
|
|
615
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
616
|
+
**Properties**
|
|
617
|
+
|
|
618
|
+
| Name | Type | Description |
|
|
619
|
+
| --- | --- | --- |
|
|
620
|
+
| enabled | <code>BooleanSetting</code> | 'true' to generate browser bundled files; 'false' for node environment only |
|
|
621
|
+
| from | <code>StringSetting</code> | The name to use for the browser-bundled output file (.js will be appended). |
|
|
622
|
+
| name | <code>StringSetting</code> | The search pattern used for retrieving compiled distribution files. |
|
|
623
|
+
| to | <code>StringSetting</code> | The output directory for browser-bundled files. |
|
|
624
|
+
|
|
625
|
+
<a name="module_gulpConfig..DistConfig"></a>
|
|
626
|
+
|
|
627
|
+
### gulpConfig~DistConfig : <code>Object.<string, Setting></code>
|
|
628
|
+
Configurations for building the node distribution files.
|
|
629
|
+
|
|
630
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
631
|
+
**Properties**
|
|
632
|
+
|
|
633
|
+
| Name | Type | Description |
|
|
634
|
+
| --- | --- | --- |
|
|
635
|
+
| from | <code>StringSetting</code> | The search pattern used for gathering source files for distribution. |
|
|
636
|
+
| main | <code>StringSetting</code> | Name of the entry the distribution file. |
|
|
637
|
+
| to | <code>StringSetting</code> | The output directory for the distribution files. |
|
|
638
|
+
|
|
639
|
+
<a name="module_gulpConfig..FontConfig"></a>
|
|
640
|
+
|
|
641
|
+
### gulpConfig~FontConfig : <code>Object.<string, Setting></code>
|
|
642
|
+
Configurations for copying the font files.
|
|
643
|
+
|
|
644
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
645
|
+
**Properties**
|
|
646
|
+
|
|
647
|
+
| Name | Type | Description |
|
|
648
|
+
| --- | --- | --- |
|
|
649
|
+
| enabled | <code>BooleanSetting</code> | Toggle copy directory of fonts on. |
|
|
650
|
+
| from | <code>StringSetting</code> | Path to search for fonts. |
|
|
651
|
+
| to | <code>StringSetting</code> | Path to output fonts. |
|
|
652
|
+
|
|
653
|
+
<a name="module_gulpConfig..ImageConfig"></a>
|
|
654
|
+
|
|
655
|
+
### gulpConfig~ImageConfig : <code>Object.<string, Setting></code>
|
|
656
|
+
Configurations to minify and copy the images.
|
|
657
|
+
|
|
658
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
659
|
+
**Properties**
|
|
660
|
+
|
|
661
|
+
| Name | Type | Description |
|
|
662
|
+
| --- | --- | --- |
|
|
663
|
+
| enabled | <code>BooleanSetting</code> | Toggle image minify and copy process. |
|
|
664
|
+
| from | <code>StringSetting</code> | Path to search for images. |
|
|
665
|
+
| to | <code>StringSetting</code> | Path to output images. |
|
|
666
|
+
|
|
667
|
+
<a name="module_gulpConfig..ReadmeConfig"></a>
|
|
668
|
+
|
|
669
|
+
### gulpConfig~ReadmeConfig : <code>Object.<string, Setting></code>
|
|
670
|
+
Configurations to compile and generate the Readme file.
|
|
671
|
+
|
|
672
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
673
|
+
**Properties**
|
|
674
|
+
|
|
675
|
+
| Name | Type | Description |
|
|
676
|
+
| --- | --- | --- |
|
|
677
|
+
| file | <code>StringSetting</code> | The name of the output documentation markdown file. |
|
|
678
|
+
| from | <code>StringSetting</code> | Location of files to use for compiling documentation into the readme. |
|
|
679
|
+
| options | <code>ArrayableSetting</code> | Options for formatting the output readme. |
|
|
680
|
+
| template | <code>StringSetting</code> | The file which will be pre-fixed to your README.md output. |
|
|
681
|
+
| to | <code>StringSetting</code> | The directory to output the readme file in. |
|
|
682
|
+
|
|
683
|
+
<a name="module_gulpConfig..SassConfig"></a>
|
|
684
|
+
|
|
685
|
+
### gulpConfig~SassConfig : <code>Object.<string, Setting></code>
|
|
686
|
+
Configurations to compile and copy the sass files into css.
|
|
687
|
+
|
|
688
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
689
|
+
**Properties**
|
|
690
|
+
|
|
691
|
+
| Name | Type | Description |
|
|
692
|
+
| --- | --- | --- |
|
|
693
|
+
| enabled | <code>BooleanSetting</code> | Toggle SASS to CSS process on. |
|
|
694
|
+
| from | <code>StringSetting</code> | The pattern for finding all sass files. |
|
|
695
|
+
| path | <code>StringSetting</code> | The directory were sass files will be stored. |
|
|
696
|
+
| to | <code>StringSetting</code> | The destination path for where generated CSS (from SASS files) should go. |
|
|
697
|
+
|
|
698
|
+
<a name="module_gulpConfig..TestConfig"></a>
|
|
699
|
+
|
|
700
|
+
### gulpConfig~TestConfig : <code>Object.<string, Setting></code>
|
|
701
|
+
Configurations for running the test suite.
|
|
702
|
+
|
|
703
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
704
|
+
**Properties**
|
|
705
|
+
|
|
706
|
+
| Name | Type | Description |
|
|
707
|
+
| --- | --- | --- |
|
|
708
|
+
| options | <code>JestTestFlags</code> | Additional flags for programmatically running Jest Cli. |
|
|
709
|
+
| path | <code>ArrayableSetting</code> | The directory where Jest test files are stored. By default, stored as *.test.js adjacent to the files they are testing. |
|
|
710
|
+
| watch | <code>ArrayableSetting</code> | The search pattern for watching files for changes. |
|
|
711
|
+
|
|
712
|
+
<a name="module_gulpConfig..TsConfig"></a>
|
|
713
|
+
|
|
714
|
+
### gulpConfig~TsConfig : <code>Object.<string, Setting></code>
|
|
715
|
+
Configurations for compiling typescript into JS files.
|
|
716
|
+
|
|
717
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
718
|
+
**Properties**
|
|
719
|
+
|
|
720
|
+
| Name | Type | Description |
|
|
721
|
+
| --- | --- | --- |
|
|
722
|
+
| config | <code>FlagStringSetting</code> | The path the tsconfig file for running typescript or false if no ts file given. |
|
|
723
|
+
| enabled | <code>BooleanSetting</code> | Toggle usage of typescript parsing. |
|
|
724
|
+
| from | <code>StringSetting</code> | Pattern for finding the TypeScript files. |
|
|
725
|
+
| to | <code>StringSetting</code> | Directory where parsed typescript files go. |
|
|
726
|
+
|
|
727
|
+
<a name="module_gulpConfig..Configurations"></a>
|
|
728
|
+
|
|
729
|
+
### gulpConfig~Configurations : <code>Object.<string, Setting></code>
|
|
730
|
+
A set of Configurations options defined by Settings.
|
|
731
|
+
|
|
732
|
+
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
733
|
+
**Properties**
|
|
734
|
+
|
|
735
|
+
| Name | Type | Description |
|
|
736
|
+
| --- | --- | --- |
|
|
737
|
+
| browser | <code>BrowserConfig</code> | Browser bundling configuration group. |
|
|
738
|
+
| cleanPaths | <code>ArrayableSetting</code> | The paths for directories to delete before build. |
|
|
739
|
+
| dist | <code>DistConfig</code> | Distribution file generation configuration group. |
|
|
740
|
+
| fonts | <code>FontConfig</code> | Fonts copy configuration group. |
|
|
741
|
+
| images | <code>ImageConfig</code> | Minify and copy the images configuration. |
|
|
742
|
+
| readme | <code>ReadmeConfig</code> | Build readme files configuration. |
|
|
743
|
+
| rootPath | <code>StringSetting</code> | Base directory of the project. |
|
|
744
|
+
| sass | <code>SassConfig</code> | Compile CSS from SASS configuration. |
|
|
745
|
+
| srcPath | <code>StringSetting</code> | The directory where your source files are stored (the files you manually created). |
|
|
746
|
+
| test | <code>TestConfig</code> | Run test suite configuration. |
|
|
747
|
+
| typescript | <code>TsConfig</code> | Compile from typescript configuration. |
|
|
748
|
+
|