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.
Files changed (63) hide show
  1. package/README.md +348 -284
  2. package/dist/build.js +7 -2
  3. package/dist/build.min.js +1 -1
  4. package/dist/bundle.js +32 -16
  5. package/dist/bundle.min.js +1 -1
  6. package/dist/bundleLint.js +16 -16
  7. package/dist/bundleMinify.js +13 -13
  8. package/dist/compileReadme.js +10 -10
  9. package/dist/copyFonts.js +13 -13
  10. package/dist/default.js +15 -15
  11. package/dist/dist.js +10 -10
  12. package/dist/distLint.js +16 -16
  13. package/dist/distMinify.js +13 -13
  14. package/dist/images.js +10 -10
  15. package/dist/partials/addToReadme.js +17 -17
  16. package/dist/partials/beginWatcher.js +12 -12
  17. package/dist/partials/clean.js +14 -14
  18. package/dist/partials/copyFor.js +12 -12
  19. package/dist/partials/distFor.js +21 -21
  20. package/dist/partials/distForSrc.js +11 -11
  21. package/dist/partials/distSeries.js +19 -19
  22. package/dist/partials/imagesFor.js +48 -48
  23. package/dist/partials/minifyFor.js +16 -16
  24. package/dist/partials/readmeTemplate.js +14 -14
  25. package/dist/partials/removeDirectory.js +29 -29
  26. package/dist/partials/runOnChange.js +28 -28
  27. package/dist/partials/sassFor.js +28 -28
  28. package/dist/partials/standardLint.js +75 -75
  29. package/dist/partials/tsFor.js +82 -82
  30. package/dist/partials/typeDocsFor.js +214 -0
  31. package/dist/partials.js +7 -0
  32. package/dist/partials.min.js +1 -1
  33. package/dist/sass.js +10 -10
  34. package/dist/test-helpers/setUp.js +89 -89
  35. package/dist/test-helpers/standardLintWithRealStandard.js +27 -27
  36. package/dist/testFull.js +20 -20
  37. package/dist/testHelpers.js +10 -10
  38. package/dist/testQuick.js +22 -22
  39. package/dist/typeDocs.js +14 -0
  40. package/dist/typeDocs.min.js +1 -0
  41. package/dist/typeScript.js +9 -9
  42. package/dist/utilities/dotGet.js +46 -46
  43. package/dist/utilities/dotNotate.js +46 -46
  44. package/dist/utilities/dotSet.js +37 -37
  45. package/dist/utilities/isObject.js +8 -8
  46. package/dist/utilities/strAfter.js +11 -11
  47. package/dist/utilities/strBefore.js +11 -11
  48. package/dist/watchFull.js +10 -10
  49. package/dist/watchTest.js +16 -16
  50. package/functions/build.mjs +7 -2
  51. package/functions/build.test.mjs +29 -0
  52. package/functions/bundle.mjs +20 -4
  53. package/functions/bundle.test.mjs +74 -0
  54. package/functions/partials/typeDocsFor.mjs +194 -0
  55. package/functions/partials/typeDocsFor.test.mjs +183 -0
  56. package/functions/partials.mjs +1 -0
  57. package/functions/partials.test.mjs +1 -1
  58. package/functions/typeDocs.mjs +9 -0
  59. package/functions/typeDocs.test.mjs +11 -0
  60. package/gulp.config.mjs +32 -0
  61. package/gulpfile.base.js +2 -0
  62. package/gulpfile.base.mjs +1 -0
  63. 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
- "files": [
337
- "src/**/*.ts"
338
- ],
358
+ "include": ["src/**/*.ts"],
359
+ "exclude": ["src/**/*.test.*"],
339
360
  "compilerOptions": {
340
- "noImplicitAny": true,
341
- "target": "es6",
342
- "moduleResolution": "node",
343
- "declaration": true
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 `"files"` should match your .ts files, but the essential thing is that it is wrapped in an array.
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
- Cleans, distributes (lint and minify), bundles (lint and minify), creates the readme, then runs the tests.
434
-
435
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
436
- <a name="module_gulpConfig"></a>
437
-
438
- ## gulpConfig
439
- Modify these configurations to match your project specifications.
440
-
441
- **Version**: 3.0.0
442
- **Author**: Joshua Heagle <joshuaheagle@gmail.com>
443
-
444
- * [gulpConfig](#module_gulpConfig)
445
- * _static_
446
- * [.get(path, defaultValue)](#module_gulpConfig.get) ⇒ <code>\*</code> \| <code>null</code>
447
- * [.set(path, value)](#module_gulpConfig.set) ⇒ <code>\*</code>
448
- * _inner_
449
- * [~ArrayableSetting](#module_gulpConfig..ArrayableSetting) : <code>Array.&lt;string&gt;</code> \| <code>string</code>
450
- * [~BooleanSetting](#module_gulpConfig..BooleanSetting) : <code>boolean</code>
451
- * [~FlagStringSetting](#module_gulpConfig..FlagStringSetting) : <code>false</code> \| <code>StringSetting</code>
452
- * [~FlagsSetting](#module_gulpConfig..FlagsSetting) : <code>Object.&lt;string, BooleanSetting&gt;</code>
453
- * [~JestTestFlags](#module_gulpConfig..JestTestFlags) : <code>FlagsSetting</code>
454
- * [~StringSetting](#module_gulpConfig..StringSetting) : <code>string</code>
455
- * [~Setting](#module_gulpConfig..Setting) : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
456
- * [~BrowserConfig](#module_gulpConfig..BrowserConfig) : <code>Object.&lt;string, Setting&gt;</code>
457
- * [~DistConfig](#module_gulpConfig..DistConfig) : <code>Object.&lt;string, Setting&gt;</code>
458
- * [~FontConfig](#module_gulpConfig..FontConfig) : <code>Object.&lt;string, Setting&gt;</code>
459
- * [~ImageConfig](#module_gulpConfig..ImageConfig) : <code>Object.&lt;string, Setting&gt;</code>
460
- * [~ReadmeConfig](#module_gulpConfig..ReadmeConfig) : <code>Object.&lt;string, Setting&gt;</code>
461
- * [~SassConfig](#module_gulpConfig..SassConfig) : <code>Object.&lt;string, Setting&gt;</code>
462
- * [~TestConfig](#module_gulpConfig..TestConfig) : <code>Object.&lt;string, Setting&gt;</code>
463
- * [~TsConfig](#module_gulpConfig..TsConfig) : <code>Object.&lt;string, Setting&gt;</code>
464
- * [~Configurations](#module_gulpConfig..Configurations) : <code>Object.&lt;string, Setting&gt;</code>
465
-
466
- <a name="module_gulpConfig.get"></a>
467
-
468
- ### gulpConfig.get(path, defaultValue) ⇒ <code>\*</code> \| <code>null</code>
469
- Retrieve a value from the configurations, default may be returned.
470
-
471
- **Kind**: static method of [<code>gulpConfig</code>](#module_gulpConfig)
472
-
473
- | Param | Type | Default |
474
- | --- | --- | --- |
475
- | path | <code>string</code> \| <code>null</code> | <code>null</code> |
476
- | defaultValue | <code>\*</code> | <code></code> |
477
-
478
- <a name="module_gulpConfig.set"></a>
479
-
480
- ### gulpConfig.set(path, value) ⇒ <code>\*</code>
481
- Specify a value for the configurations to use.
482
-
483
- **Kind**: static method of [<code>gulpConfig</code>](#module_gulpConfig)
484
-
485
- | Param |
486
- | --- |
487
- | path |
488
- | value |
489
-
490
- <a name="module_gulpConfig..ArrayableSetting"></a>
491
-
492
- ### gulpConfig~ArrayableSetting : <code>Array.&lt;string&gt;</code> \| <code>string</code>
493
- A setting that may be an array of strings or a string only.
494
-
495
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
496
- <a name="module_gulpConfig..BooleanSetting"></a>
497
-
498
- ### gulpConfig~BooleanSetting : <code>boolean</code>
499
- A setting that may be true or false.
500
-
501
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
502
- <a name="module_gulpConfig..FlagStringSetting"></a>
503
-
504
- ### gulpConfig~FlagStringSetting : <code>false</code> \| <code>StringSetting</code>
505
- A setting that may be flag 'false' or provide a StringSetting
506
-
507
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
508
- <a name="module_gulpConfig..FlagsSetting"></a>
509
-
510
- ### gulpConfig~FlagsSetting : <code>Object.&lt;string, BooleanSetting&gt;</code>
511
- An object of boolean settings used as flags.
512
-
513
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
514
- <a name="module_gulpConfig..JestTestFlags"></a>
515
-
516
- ### gulpConfig~JestTestFlags : <code>FlagsSetting</code>
517
- Configure cli options for running Jest.
518
-
519
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
520
- **Properties**
521
-
522
- | Name | Type |
523
- | --- | --- |
524
- | clearCache | <code>BooleanSetting</code> |
525
- | debug | <code>BooleanSetting</code> |
526
- | ignoreProjects: | <code>BooleanSetting</code> |
527
- | json | <code>BooleanSetting</code> |
528
- | selectProjects | <code>BooleanSetting</code> |
529
- | showConfig | <code>BooleanSetting</code> |
530
- | useStderr | <code>BooleanSetting</code> |
531
- | watch | <code>BooleanSetting</code> |
532
- | watchAll | <code>BooleanSetting</code> |
533
-
534
- <a name="module_gulpConfig..StringSetting"></a>
535
-
536
- ### gulpConfig~StringSetting : <code>string</code>
537
- A setting that may only be a string.
538
-
539
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
540
- <a name="module_gulpConfig..Setting"></a>
541
-
542
- ### gulpConfig~Setting : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
543
- Any single configuration option is a Setting.
544
-
545
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
546
- <a name="module_gulpConfig..BrowserConfig"></a>
547
-
548
- ### gulpConfig~BrowserConfig : <code>Object.&lt;string, Setting&gt;</code>
549
- Configurations for building the browser files.
550
-
551
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
552
- **Properties**
553
-
554
- | Name | Type | Description |
555
- | --- | --- | --- |
556
- | enabled | <code>BooleanSetting</code> | 'true' to generate browser bundled files; 'false' for node environment only |
557
- | from | <code>StringSetting</code> | The name to use for the browser-bundled output file (.js will be appended). |
558
- | name | <code>StringSetting</code> | The search pattern used for retrieving compiled distribution files. |
559
- | to | <code>StringSetting</code> | The output directory for browser-bundled files. |
560
-
561
- <a name="module_gulpConfig..DistConfig"></a>
562
-
563
- ### gulpConfig~DistConfig : <code>Object.&lt;string, Setting&gt;</code>
564
- Configurations for building the node distribution files.
565
-
566
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
567
- **Properties**
568
-
569
- | Name | Type | Description |
570
- | --- | --- | --- |
571
- | from | <code>StringSetting</code> | The search pattern used for gathering source files for distribution. |
572
- | main | <code>StringSetting</code> | Name of the entry the distribution file. |
573
- | to | <code>StringSetting</code> | The output directory for the distribution files. |
574
-
575
- <a name="module_gulpConfig..FontConfig"></a>
576
-
577
- ### gulpConfig~FontConfig : <code>Object.&lt;string, Setting&gt;</code>
578
- Configurations for copying the font files.
579
-
580
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
581
- **Properties**
582
-
583
- | Name | Type | Description |
584
- | --- | --- | --- |
585
- | enabled | <code>BooleanSetting</code> | Toggle copy directory of fonts on. |
586
- | from | <code>StringSetting</code> | Path to search for fonts. |
587
- | to | <code>StringSetting</code> | Path to output fonts. |
588
-
589
- <a name="module_gulpConfig..ImageConfig"></a>
590
-
591
- ### gulpConfig~ImageConfig : <code>Object.&lt;string, Setting&gt;</code>
592
- Configurations to minify and copy the images.
593
-
594
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
595
- **Properties**
596
-
597
- | Name | Type | Description |
598
- | --- | --- | --- |
599
- | enabled | <code>BooleanSetting</code> | Toggle image minify and copy process. |
600
- | from | <code>StringSetting</code> | Path to search for images. |
601
- | to | <code>StringSetting</code> | Path to output images. |
602
-
603
- <a name="module_gulpConfig..ReadmeConfig"></a>
604
-
605
- ### gulpConfig~ReadmeConfig : <code>Object.&lt;string, Setting&gt;</code>
606
- Configurations to compile and generate the Readme file.
607
-
608
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
609
- **Properties**
610
-
611
- | Name | Type | Description |
612
- | --- | --- | --- |
613
- | file | <code>StringSetting</code> | The name of the output documentation markdown file. |
614
- | from | <code>StringSetting</code> | Location of files to use for compiling documentation into the readme. |
615
- | options | <code>ArrayableSetting</code> | Options for formatting the output readme. |
616
- | template | <code>StringSetting</code> | The file which will be pre-fixed to your README.md output. |
617
- | to | <code>StringSetting</code> | The directory to output the readme file in. |
618
-
619
- <a name="module_gulpConfig..SassConfig"></a>
620
-
621
- ### gulpConfig~SassConfig : <code>Object.&lt;string, Setting&gt;</code>
622
- Configurations to compile and copy the sass files into css.
623
-
624
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
625
- **Properties**
626
-
627
- | Name | Type | Description |
628
- | --- | --- | --- |
629
- | enabled | <code>BooleanSetting</code> | Toggle SASS to CSS process on. |
630
- | from | <code>StringSetting</code> | The pattern for finding all sass files. |
631
- | path | <code>StringSetting</code> | The directory were sass files will be stored. |
632
- | to | <code>StringSetting</code> | The destination path for where generated CSS (from SASS files) should go. |
633
-
634
- <a name="module_gulpConfig..TestConfig"></a>
635
-
636
- ### gulpConfig~TestConfig : <code>Object.&lt;string, Setting&gt;</code>
637
- Configurations for running the test suite.
638
-
639
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
640
- **Properties**
641
-
642
- | Name | Type | Description |
643
- | --- | --- | --- |
644
- | options | <code>JestTestFlags</code> | Additional flags for programmatically running Jest Cli. |
645
- | 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. |
646
- | watch | <code>ArrayableSetting</code> | The search pattern for watching files for changes. |
647
-
648
- <a name="module_gulpConfig..TsConfig"></a>
649
-
650
- ### gulpConfig~TsConfig : <code>Object.&lt;string, Setting&gt;</code>
651
- Configurations for compiling typescript into JS files.
652
-
653
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
654
- **Properties**
655
-
656
- | Name | Type | Description |
657
- | --- | --- | --- |
658
- | config | <code>FlagStringSetting</code> | The path the tsconfig file for running typescript or false if no ts file given. |
659
- | enabled | <code>BooleanSetting</code> | Toggle usage of typescript parsing. |
660
- | from | <code>StringSetting</code> | Pattern for finding the TypeScript files. |
661
- | to | <code>StringSetting</code> | Directory where parsed typescript files go. |
662
-
663
- <a name="module_gulpConfig..Configurations"></a>
664
-
665
- ### gulpConfig~Configurations : <code>Object.&lt;string, Setting&gt;</code>
666
- A set of Configurations options defined by Settings.
667
-
668
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
669
- **Properties**
670
-
671
- | Name | Type | Description |
672
- | --- | --- | --- |
673
- | browser | <code>BrowserConfig</code> | Browser bundling configuration group. |
674
- | cleanPaths | <code>ArrayableSetting</code> | The paths for directories to delete before build. |
675
- | dist | <code>DistConfig</code> | Distribution file generation configuration group. |
676
- | fonts | <code>FontConfig</code> | Fonts copy configuration group. |
677
- | images | <code>ImageConfig</code> | Minify and copy the images configuration. |
678
- | readme | <code>ReadmeConfig</code> | Build readme files configuration. |
679
- | rootPath | <code>StringSetting</code> | Base directory of the project. |
680
- | sass | <code>SassConfig</code> | Compile CSS from SASS configuration. |
681
- | srcPath | <code>StringSetting</code> | The directory where your source files are stored (the files you manually created). |
682
- | test | <code>TestConfig</code> | Run test suite configuration. |
683
- | typescript | <code>TsConfig</code> | Compile from typescript configuration. |
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.&lt;string&gt;</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.&lt;string, BooleanSetting&gt;</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.&lt;string, Setting&gt;</code>
521
+ * [~DistConfig](#module_gulpConfig..DistConfig) : <code>Object.&lt;string, Setting&gt;</code>
522
+ * [~FontConfig](#module_gulpConfig..FontConfig) : <code>Object.&lt;string, Setting&gt;</code>
523
+ * [~ImageConfig](#module_gulpConfig..ImageConfig) : <code>Object.&lt;string, Setting&gt;</code>
524
+ * [~ReadmeConfig](#module_gulpConfig..ReadmeConfig) : <code>Object.&lt;string, Setting&gt;</code>
525
+ * [~SassConfig](#module_gulpConfig..SassConfig) : <code>Object.&lt;string, Setting&gt;</code>
526
+ * [~TestConfig](#module_gulpConfig..TestConfig) : <code>Object.&lt;string, Setting&gt;</code>
527
+ * [~TsConfig](#module_gulpConfig..TsConfig) : <code>Object.&lt;string, Setting&gt;</code>
528
+ * [~Configurations](#module_gulpConfig..Configurations) : <code>Object.&lt;string, Setting&gt;</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.&lt;string&gt;</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.&lt;string, BooleanSetting&gt;</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.&lt;string, Setting&gt;</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.&lt;string, Setting&gt;</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.&lt;string, Setting&gt;</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.&lt;string, Setting&gt;</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.&lt;string, Setting&gt;</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.&lt;string, Setting&gt;</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.&lt;string, Setting&gt;</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.&lt;string, Setting&gt;</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.&lt;string, Setting&gt;</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
+