js-build-tools 5.2.0 → 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 (60) hide show
  1. package/README.md +75 -10
  2. package/dist/build.js +7 -2
  3. package/dist/build.min.js +1 -1
  4. package/dist/bundle.js +27 -27
  5. package/dist/bundleLint.js +16 -16
  6. package/dist/bundleMinify.js +13 -13
  7. package/dist/compileReadme.js +10 -10
  8. package/dist/copyFonts.js +13 -13
  9. package/dist/default.js +15 -15
  10. package/dist/dist.js +10 -10
  11. package/dist/distLint.js +16 -16
  12. package/dist/distMinify.js +13 -13
  13. package/dist/images.js +10 -10
  14. package/dist/partials/addToReadme.js +17 -17
  15. package/dist/partials/beginWatcher.js +12 -12
  16. package/dist/partials/clean.js +14 -14
  17. package/dist/partials/copyFor.js +12 -12
  18. package/dist/partials/distFor.js +21 -21
  19. package/dist/partials/distForSrc.js +11 -11
  20. package/dist/partials/distSeries.js +19 -19
  21. package/dist/partials/imagesFor.js +48 -48
  22. package/dist/partials/minifyFor.js +16 -16
  23. package/dist/partials/readmeTemplate.js +14 -14
  24. package/dist/partials/removeDirectory.js +29 -29
  25. package/dist/partials/runOnChange.js +28 -28
  26. package/dist/partials/sassFor.js +28 -28
  27. package/dist/partials/standardLint.js +75 -75
  28. package/dist/partials/tsFor.js +82 -82
  29. package/dist/partials/typeDocsFor.js +214 -0
  30. package/dist/partials.js +7 -0
  31. package/dist/partials.min.js +1 -1
  32. package/dist/sass.js +10 -10
  33. package/dist/test-helpers/setUp.js +89 -89
  34. package/dist/test-helpers/standardLintWithRealStandard.js +27 -27
  35. package/dist/testFull.js +20 -20
  36. package/dist/testHelpers.js +10 -10
  37. package/dist/testQuick.js +22 -22
  38. package/dist/typeDocs.js +14 -0
  39. package/dist/typeDocs.min.js +1 -0
  40. package/dist/typeScript.js +9 -9
  41. package/dist/utilities/dotGet.js +46 -46
  42. package/dist/utilities/dotNotate.js +46 -46
  43. package/dist/utilities/dotSet.js +37 -37
  44. package/dist/utilities/isObject.js +8 -8
  45. package/dist/utilities/strAfter.js +11 -11
  46. package/dist/utilities/strBefore.js +11 -11
  47. package/dist/watchFull.js +10 -10
  48. package/dist/watchTest.js +16 -16
  49. package/functions/build.mjs +7 -2
  50. package/functions/build.test.mjs +29 -0
  51. package/functions/partials/typeDocsFor.mjs +194 -0
  52. package/functions/partials/typeDocsFor.test.mjs +183 -0
  53. package/functions/partials.mjs +1 -0
  54. package/functions/partials.test.mjs +1 -1
  55. package/functions/typeDocs.mjs +9 -0
  56. package/functions/typeDocs.test.mjs +11 -0
  57. package/gulp.config.mjs +22 -0
  58. package/gulpfile.base.js +2 -0
  59. package/gulpfile.base.mjs +1 -0
  60. 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",
package/dist/build.js CHANGED
@@ -10,6 +10,7 @@ const _bundleLint = require('./bundleLint.js')
10
10
  const _bundleMinify = require('./bundleMinify.js')
11
11
  const _partials = require('./partials.js')
12
12
  const _compileReadme = require('./compileReadme.js')
13
+ const _typeDocs = require('./typeDocs.js')
13
14
  const _distLint = require('./distLint.js')
14
15
  const _distMinify = require('./distMinify.js')
15
16
  const _gulp = require('gulp')
@@ -29,7 +30,11 @@ const build = (done = null) => {
29
30
  const distLintMinify = (0, _gulp.parallel)(_distLint.distLint, _distMinify.distMinify)
30
31
  const bundleLintMinify = (0, _gulp.parallel)(_bundleLint.bundleLint, _bundleMinify.bundleMinify)
31
32
  const buildActions = [(0, _partials.distSeries)(), distLintMinify]
32
- if (gulpConfig.get('typescript.enabled')) {
33
+ const generateDocs = gulpConfig.get('docs.enabled')
34
+ if (generateDocs) {
35
+ // The documentation is generated from the TypeScript source itself, the readme is written by hand
36
+ buildActions.push(_typeDocs.typeDocs)
37
+ } else if (gulpConfig.get('typescript.enabled')) {
33
38
  // For ts usage, we need to run the readme on the dist directly since that is where the .js files are located
34
39
  buildActions.push(_compileReadme.compileReadme)
35
40
  }
@@ -39,7 +44,7 @@ const build = (done = null) => {
39
44
  buildActions.push(bundleLintMinify)
40
45
  }
41
46
  const runActions = [(0, _gulp.series)(...buildActions)]
42
- if (!gulpConfig.get('typescript.enabled')) {
47
+ if (!generateDocs && !gulpConfig.get('typescript.enabled')) {
43
48
  // Since we didn't run this in series after dist because of typescript, we need to run it now. Potentially faster here.
44
49
  runActions.push(_compileReadme.compileReadme)
45
50
  }
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 _bundle=require("./bundle.js"),_bundleLint=require("./bundleLint.js"),_bundleMinify=require("./bundleMinify.js"),_partials=require("./partials.js"),_compileReadme=require("./compileReadme.js"),_distLint=require("./distLint.js"),_distMinify=require("./distMinify.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,i){if("function"==typeof WeakMap)var s=new WeakMap,t=new WeakMap;return(_interopRequireWildcard=function(e,i){if(!i&&e&&e.__esModule)return e;var l,r,n={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return n;if(l=i?t:s){if(l.has(e))return l.get(e);l.set(e,n)}for(const i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?l(n,i,r):n[i]=e[i]);return n})(e,i)}const build=(e=null)=>{const i=(0,_gulp.parallel)(_distLint.distLint,_distMinify.distMinify),s=(0,_gulp.parallel)(_bundleLint.bundleLint,_bundleMinify.bundleMinify),t=[(0,_partials.distSeries)(),i];gulpConfig.get("typescript.enabled")&&t.push(_compileReadme.compileReadme),gulpConfig.get("browser.enabled")&&(t.push(_bundle.bundle),t.push(s));const l=[(0,_gulp.series)(...t)];return gulpConfig.get("typescript.enabled")||l.push(_compileReadme.compileReadme),l.push(_testFull.testFull),gulpConfig.get("fonts.enabled")&&l.push(_copyFonts.copyFonts),gulpConfig.get("images.enabled")&&l.push(_images.images),gulpConfig.get("sass.enabled")&&l.push(_sass.sass),(0,_gulp.series)(_partials.clean,(0,_gulp.parallel)(...l))(e)};exports.build=build;
1
+ "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=void 0;var _bundle=require("./bundle.js"),_bundleLint=require("./bundleLint.js"),_bundleMinify=require("./bundleMinify.js"),_partials=require("./partials.js"),_compileReadme=require("./compileReadme.js"),_typeDocs=require("./typeDocs.js"),_distLint=require("./distLint.js"),_distMinify=require("./distMinify.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,i){if("function"==typeof WeakMap)var s=new WeakMap,t=new WeakMap;return(_interopRequireWildcard=function(e,i){if(!i&&e&&e.__esModule)return e;var l,r,u={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return u;if(l=i?t:s){if(l.has(e))return l.get(e);l.set(e,u)}for(const i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?l(u,i,r):u[i]=e[i]);return u})(e,i)}const build=(e=null)=>{const i=(0,_gulp.parallel)(_distLint.distLint,_distMinify.distMinify),s=(0,_gulp.parallel)(_bundleLint.bundleLint,_bundleMinify.bundleMinify),t=[(0,_partials.distSeries)(),i],l=gulpConfig.get("docs.enabled");l?t.push(_typeDocs.typeDocs):gulpConfig.get("typescript.enabled")&&t.push(_compileReadme.compileReadme),gulpConfig.get("browser.enabled")&&(t.push(_bundle.bundle),t.push(s));const r=[(0,_gulp.series)(...t)];return l||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)(_partials.clean,(0,_gulp.parallel)(...r))(e)};exports.build=build;
package/dist/bundle.js CHANGED
@@ -1,16 +1,16 @@
1
- 'use strict'
2
-
3
- require('core-js/modules/esnext.weak-map.delete-all.js')
4
- Object.defineProperty(exports, '__esModule', {
5
- value: true
6
- })
7
- exports.bundle = void 0
8
- const _browserify = _interopRequireDefault(require('browserify'))
9
- const _gulp = require('gulp')
10
- const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
11
- const _vinylSourceStream = _interopRequireDefault(require('vinyl-source-stream'))
12
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
13
- function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
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
+ const _browserify = _interopRequireDefault(require('browserify'))
9
+ const _gulp = require('gulp')
10
+ const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
11
+ const _vinylSourceStream = _interopRequireDefault(require('vinyl-source-stream'))
12
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
13
+ function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
14
14
  /**
15
15
  * Starting at the distribution entry point, bundle all the files into a single file and store them in the specified output directory.
16
16
  *
@@ -20,17 +20,17 @@ function _interopRequireDefault (e) { return e && e.__esModule ? e : { default:
20
20
  * code must not require it, or provide it another way, such as a separate script tag).
21
21
  * @memberOf module:js-build-tools
22
22
  * @returns {stream.Stream}
23
- */
24
- const bundle = () => {
25
- const bundler = (0, _browserify.default)(gulpConfig.get('dist.main'))
26
- const ignore = gulpConfig.get('browser.ignore')
27
- const exclude = gulpConfig.get('browser.exclude')
28
- if (ignore && ignore.length) {
29
- bundler.ignore(ignore)
30
- }
31
- if (exclude && exclude.length) {
32
- bundler.exclude(exclude)
33
- }
34
- return bundler.bundle().pipe((0, _vinylSourceStream.default)(`${gulpConfig.get('browser.name')}.js`)).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
35
- }
36
- exports.bundle = bundle
23
+ */
24
+ const bundle = () => {
25
+ const bundler = (0, _browserify.default)(gulpConfig.get('dist.main'))
26
+ const ignore = gulpConfig.get('browser.ignore')
27
+ const exclude = gulpConfig.get('browser.exclude')
28
+ if (ignore && ignore.length) {
29
+ bundler.ignore(ignore)
30
+ }
31
+ if (exclude && exclude.length) {
32
+ bundler.exclude(exclude)
33
+ }
34
+ return bundler.bundle().pipe((0, _vinylSourceStream.default)(`${gulpConfig.get('browser.name')}.js`)).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
35
+ }
36
+ exports.bundle = bundle
@@ -1,20 +1,20 @@
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.bundleLint = void 0
8
- const _gulp = require('gulp')
9
- const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
10
- const _standardLint = require('./partials/standardLint.js')
11
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
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.bundleLint = void 0
8
+ const _gulp = require('gulp')
9
+ const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
10
+ const _standardLint = require('./partials/standardLint.js')
11
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
12
12
  /**
13
13
  * Applies Standard code style linting to bundled file.
14
14
  * @memberOf module:js-build-tools
15
15
  * @returns {stream.Stream}
16
- */
17
- const bundleLint = () => (0, _gulp.src)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`).pipe((0, _standardLint.standardLint)({
18
- fix: true
19
- })).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
20
- exports.bundleLint = bundleLint
16
+ */
17
+ const bundleLint = () => (0, _gulp.src)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`).pipe((0, _standardLint.standardLint)({
18
+ fix: true
19
+ })).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
20
+ exports.bundleLint = bundleLint
@@ -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
- const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
- const _minifyFor = require('./partials/minifyFor.js')
10
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
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
+ const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
+ const _minifyFor = require('./partials/minifyFor.js')
10
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
11
11
  /**
12
12
  * Creates the minified bundle file.
13
13
  * @memberOf module:js-build-tools
14
14
  * @returns {*}
15
- */
16
- const bundleMinify = () => (0, _minifyFor.minifyFor)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`, gulpConfig.get('browser.to'))
17
- exports.bundleMinify = bundleMinify
15
+ */
16
+ const bundleMinify = () => (0, _minifyFor.minifyFor)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`, gulpConfig.get('browser.to'))
17
+ exports.bundleMinify = bundleMinify
@@ -1,14 +1,14 @@
1
- 'use strict'
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- })
6
- exports.compileReadme = void 0
7
- const _partials = require('./partials.js')
8
- const _gulp = require('gulp')
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.compileReadme = void 0
7
+ const _partials = require('./partials.js')
8
+ const _gulp = require('gulp')
9
9
  /**
10
10
  * Generate the README.md file based off of the template, then append the generated documentation.
11
11
  * @memberOf module:js-build-tools
12
12
  * @returns {stream.Stream}
13
- */
14
- const compileReadme = exports.compileReadme = (0, _gulp.series)(_partials.readmeTemplate, _partials.addToReadme)
13
+ */
14
+ const compileReadme = exports.compileReadme = (0, _gulp.series)(_partials.readmeTemplate, _partials.addToReadme)
package/dist/copyFonts.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.copyFonts = void 0
8
- const _copyFor = require('./partials/copyFor.js')
9
- const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
10
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
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
+ const _copyFor = require('./partials/copyFor.js')
9
+ const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
10
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
11
11
  /**
12
12
  * Move the font files into the browser directory.
13
13
  * @memberOf module:js-build-tools
14
14
  * @return {stream.Stream}
15
- */
16
- const copyFonts = () => (0, _copyFor.copyFor)(gulpConfig.get('fonts.from'), gulpConfig.get('fonts.to'))
17
- exports.copyFonts = copyFonts
15
+ */
16
+ const copyFonts = () => (0, _copyFor.copyFor)(gulpConfig.get('fonts.from'), gulpConfig.get('fonts.to'))
17
+ exports.copyFonts = copyFonts
package/dist/default.js CHANGED
@@ -1,20 +1,20 @@
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
- const _dist = require('./dist.js')
9
- const _bundle = require('./bundle.js')
10
- const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
11
- const _gulp = require('gulp')
12
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
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
+ const _dist = require('./dist.js')
9
+ const _bundle = require('./bundle.js')
10
+ const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
11
+ const _gulp = require('gulp')
12
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
13
13
  /**
14
14
  * Recommended as the default task, runs the simple dist and bundle tasks.
15
15
  * @memberOf module:js-build-tools
16
16
  * @param {function} [done=null]
17
17
  * @returns {stream.Stream}
18
- */
19
- const defaultCmd = (done = null) => gulpConfig.get('browser.enabled') ? (0, _gulp.series)(_dist.dist, _bundle.bundle)(done) : (0, _gulp.series)(_dist.dist)(done)
20
- exports.defaultCmd = defaultCmd
18
+ */
19
+ const defaultCmd = (done = null) => gulpConfig.get('browser.enabled') ? (0, _gulp.series)(_dist.dist, _bundle.bundle)(done) : (0, _gulp.series)(_dist.dist)(done)
20
+ exports.defaultCmd = defaultCmd
package/dist/dist.js CHANGED
@@ -1,14 +1,14 @@
1
- 'use strict'
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- })
6
- exports.dist = void 0
7
- const _distFor = require('./partials/distFor.js')
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.dist = void 0
7
+ const _distFor = require('./partials/distFor.js')
8
8
  /**
9
9
  * Simplified distribution tasks which will use arguments from distFor.
10
10
  * @memberOf module:js-build-tools
11
11
  * @returns {*}
12
- */
13
- const dist = () => (0, _distFor.distFor)()
14
- exports.dist = dist
12
+ */
13
+ const dist = () => (0, _distFor.distFor)()
14
+ exports.dist = dist
package/dist/distLint.js CHANGED
@@ -1,20 +1,20 @@
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.distLint = void 0
8
- const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
- const _gulp = require('gulp')
10
- const _standardLint = require('./partials/standardLint.js')
11
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
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.distLint = void 0
8
+ const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
+ const _gulp = require('gulp')
10
+ const _standardLint = require('./partials/standardLint.js')
11
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
12
12
  /**
13
13
  * Applies Standard code style linting to distribution files.
14
14
  * @memberOf module:js-build-tools
15
15
  * @returns {*}
16
- */
17
- const distLint = () => (0, _gulp.src)(gulpConfig.get('browser.from')).pipe((0, _standardLint.standardLint)({
18
- fix: true
19
- })).pipe((0, _gulp.dest)(gulpConfig.get('dist.to')))
20
- exports.distLint = distLint
16
+ */
17
+ const distLint = () => (0, _gulp.src)(gulpConfig.get('browser.from')).pipe((0, _standardLint.standardLint)({
18
+ fix: true
19
+ })).pipe((0, _gulp.dest)(gulpConfig.get('dist.to')))
20
+ exports.distLint = distLint
@@ -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.distMinify = void 0
8
- const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
- const _minifyFor = require('./partials/minifyFor.js')
10
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
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.distMinify = void 0
8
+ const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
+ const _minifyFor = require('./partials/minifyFor.js')
10
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
11
11
  /**
12
12
  * Creates minified versions of the dist files.
13
13
  * @memberOf module:js-build-tools
14
14
  * @returns {*}
15
- */
16
- const distMinify = () => (0, _minifyFor.minifyFor)(gulpConfig.get('browser.from'), gulpConfig.get('dist.to'))
17
- exports.distMinify = distMinify
15
+ */
16
+ const distMinify = () => (0, _minifyFor.minifyFor)(gulpConfig.get('browser.from'), gulpConfig.get('dist.to'))
17
+ exports.distMinify = distMinify
package/dist/images.js CHANGED
@@ -1,14 +1,14 @@
1
- 'use strict'
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- })
6
- exports.images = void 0
7
- const _imagesFor = require('./partials/imagesFor.js')
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.images = void 0
7
+ const _imagesFor = require('./partials/imagesFor.js')
8
8
  /**
9
9
  * Move and optimize the images into the browser folder using configured settings.
10
10
  * @memberOf module:js-build-tools
11
11
  * @return {stream.Stream}
12
- */
13
- const images = () => (0, _imagesFor.imagesFor)()
14
- exports.images = images
12
+ */
13
+ const images = () => (0, _imagesFor.imagesFor)()
14
+ exports.images = images
@@ -1,23 +1,23 @@
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.addToReadme = void 0;
8
- var _fs = _interopRequireDefault(require("fs"));
9
- var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
10
- var _jsdocToMarkdown = _interopRequireDefault(require("jsdoc-to-markdown"));
11
- var _glob = require("glob");
12
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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.addToReadme = void 0;
8
+ var _fs = _interopRequireDefault(require("fs"));
9
+ var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
10
+ var _jsdocToMarkdown = _interopRequireDefault(require("jsdoc-to-markdown"));
11
+ var _glob = require("glob");
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  /**
15
15
  * Appends all the jsdoc comments to the readme file. Assumes empty or templated file.
16
16
  * Configure this with 'readmeSearch', 'readmePath', 'readmeFile', and 'readmeOptions'.
17
17
  * @memberOf module:partials
18
18
  * @returns {string|Uint8Array}
19
- */
20
- const addToReadme = () => _jsdocToMarkdown.default.render({
21
- files: (0, _glob.globSync)(gulpConfig.get('readme.from'))
22
- }).then(readme => _fs.default.appendFileSync(gulpConfig.get('readme.to') + gulpConfig.get('readme.file'), readme, gulpConfig.get('readmeOptions')));
19
+ */
20
+ const addToReadme = () => _jsdocToMarkdown.default.render({
21
+ files: (0, _glob.globSync)(gulpConfig.get('readme.from'))
22
+ }).then(readme => _fs.default.appendFileSync(gulpConfig.get('readme.to') + gulpConfig.get('readme.file'), readme, gulpConfig.get('readmeOptions')));
23
23
  exports.addToReadme = addToReadme;
@@ -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.beginWatcher = void 0;
8
- var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
9
- var _gulp = require("gulp");
10
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
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.beginWatcher = void 0;
8
+ var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
9
+ var _gulp = require("gulp");
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
11
  /**
12
12
  * Create a chokidar instance which watches and triggers change when the globed files are modified.
13
13
  * @memberOf module:partials
14
14
  * @returns {FSWatcher}
15
- */
16
- const beginWatcher = () => (0, _gulp.watch)(gulpConfig.get('test.watch'));
15
+ */
16
+ const beginWatcher = () => (0, _gulp.watch)(gulpConfig.get('test.watch'));
17
17
  exports.beginWatcher = beginWatcher;