js-build-tools 3.0.4 → 4.0.1

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 (213) hide show
  1. package/README.md +166 -426
  2. package/babel.config.js +1 -1
  3. package/dist/build.js +33 -34
  4. package/dist/build.min.js +1 -1
  5. package/dist/bundle.js +14 -9
  6. package/dist/bundle.min.js +1 -1
  7. package/dist/bundleLint.js +15 -11
  8. package/dist/bundleLint.min.js +1 -1
  9. package/dist/bundleMinify.js +11 -5
  10. package/dist/bundleMinify.min.js +1 -1
  11. package/dist/compileReadme.js +7 -10
  12. package/dist/compileReadme.min.js +1 -1
  13. package/dist/copyFonts.js +11 -5
  14. package/dist/copyFonts.min.js +1 -1
  15. package/dist/default.js +13 -9
  16. package/dist/default.min.js +1 -1
  17. package/dist/dist.js +7 -4
  18. package/dist/dist.min.js +1 -1
  19. package/dist/distLint.js +15 -11
  20. package/dist/distLint.min.js +1 -1
  21. package/dist/distMinify.js +11 -5
  22. package/dist/distMinify.min.js +1 -1
  23. package/dist/images.js +7 -4
  24. package/dist/images.min.js +1 -1
  25. package/dist/partials/addToReadme.js +16 -11
  26. package/dist/partials/beginWatcher.js +11 -7
  27. package/dist/partials/clean.js +11 -5
  28. package/dist/partials/copyFor.js +7 -7
  29. package/dist/partials/distFor.js +21 -11
  30. package/dist/partials/distForSrc.js +9 -3
  31. package/dist/partials/distSeries.js +17 -13
  32. package/dist/partials/imagesFor.js +16 -17
  33. package/dist/partials/minifyFor.js +12 -11
  34. package/dist/partials/readmeTemplate.js +13 -9
  35. package/dist/partials/removeDirectory.js +7 -7
  36. package/dist/partials/runOnChange.js +18 -16
  37. package/dist/partials/sassFor.js +19 -12
  38. package/dist/partials/tsFor.js +17 -14
  39. package/dist/partials.js +101 -39
  40. package/dist/partials.min.js +1 -1
  41. package/dist/sass.js +7 -4
  42. package/dist/sass.min.js +1 -1
  43. package/dist/test-helpers/setUp.js +50 -47
  44. package/dist/testFull.js +12 -7
  45. package/dist/testFull.min.js +1 -1
  46. package/dist/testHelpers.js +9 -13
  47. package/dist/testHelpers.min.js +1 -1
  48. package/dist/testQuick.js +12 -7
  49. package/dist/testQuick.min.js +1 -1
  50. package/dist/typeScript.js +6 -4
  51. package/dist/typeScript.min.js +1 -1
  52. package/dist/utilities/dotGet.js +14 -12
  53. package/dist/utilities/dotNotate.js +10 -8
  54. package/dist/utilities/dotSet.js +13 -11
  55. package/dist/utilities/isObject.js +5 -1
  56. package/dist/utilities/strAfter.js +11 -7
  57. package/dist/utilities/strBefore.js +11 -7
  58. package/dist/watchFull.js +7 -7
  59. package/dist/watchFull.min.js +1 -1
  60. package/dist/watchTest.js +13 -9
  61. package/dist/watchTest.min.js +1 -1
  62. package/functions/{build.js → build.mjs} +14 -16
  63. package/functions/{build.test.js → build.test.mjs} +9 -8
  64. package/functions/{bundle.js → bundle.mjs} +5 -7
  65. package/functions/{bundle.test.js → bundle.test.mjs} +5 -4
  66. package/functions/{bundleLint.js → bundleLint.mjs} +4 -6
  67. package/functions/{bundleLint.test.js → bundleLint.test.mjs} +5 -4
  68. package/functions/bundleMinify.mjs +9 -0
  69. package/functions/bundleMinify.test.mjs +15 -0
  70. package/functions/compileReadme.mjs +9 -0
  71. package/functions/{compileReadme.test.js → compileReadme.test.mjs} +4 -4
  72. package/functions/copyFonts.mjs +9 -0
  73. package/functions/{copyFonts.test.js → copyFonts.test.mjs} +4 -3
  74. package/functions/default.mjs +12 -0
  75. package/functions/{default.test.js → default.test.mjs} +8 -7
  76. package/functions/{dist.js → dist.mjs} +2 -4
  77. package/functions/{dist.test.js → dist.test.mjs} +4 -3
  78. package/functions/{distLint.js → distLint.mjs} +4 -6
  79. package/functions/{distLint.test.js → distLint.test.mjs} +5 -4
  80. package/functions/distMinify.mjs +9 -0
  81. package/functions/distMinify.test.mjs +15 -0
  82. package/functions/{images.js → images.mjs} +2 -4
  83. package/functions/{images.test.js → images.test.mjs} +4 -3
  84. package/functions/partials/{addToReadme.js → addToReadme.mjs} +5 -7
  85. package/functions/partials/{addToReadme.test.js → addToReadme.test.mjs} +4 -3
  86. package/functions/partials/beginWatcher.mjs +9 -0
  87. package/functions/partials/{beginWatcher.test.js → beginWatcher.test.mjs} +4 -3
  88. package/functions/partials/clean.mjs +13 -0
  89. package/functions/partials/{clean.test.js → clean.test.mjs} +4 -3
  90. package/functions/partials/{copyFor.js → copyFor.mjs} +2 -4
  91. package/functions/partials/{copyFor.test.js → copyFor.test.mjs} +4 -3
  92. package/functions/partials/distFor.mjs +22 -0
  93. package/functions/partials/{distFor.test.js → distFor.test.mjs} +49 -8
  94. package/functions/partials/{distForSrc.js → distForSrc.mjs} +2 -4
  95. package/functions/partials/{distForSrc.test.js → distForSrc.test.mjs} +3 -2
  96. package/functions/partials/{distSeries.js → distSeries.mjs} +6 -8
  97. package/functions/partials/{distSeries.test.js → distSeries.test.mjs} +7 -6
  98. package/functions/partials/{imagesFor.js → imagesFor.mjs} +5 -13
  99. package/functions/partials/{imagesFor.test.js → imagesFor.test.mjs} +4 -3
  100. package/functions/partials/minifyFor.mjs +15 -0
  101. package/functions/partials/{minifyFor.test.js → minifyFor.test.mjs} +5 -4
  102. package/functions/partials/readmeTemplate.mjs +12 -0
  103. package/functions/partials/{readmeTemplate.test.js → readmeTemplate.test.mjs} +4 -3
  104. package/functions/partials/{removeDirectory.js → removeDirectory.mjs} +2 -4
  105. package/functions/partials/{removeDirectory.test.js → removeDirectory.test.mjs} +28 -28
  106. package/functions/partials/{runOnChange.js → runOnChange.mjs} +6 -8
  107. package/functions/partials/{runOnChange.test.js → runOnChange.test.mjs} +12 -11
  108. package/functions/partials/sassFor.mjs +22 -0
  109. package/functions/partials/{sassFor.test.js → sassFor.test.mjs} +5 -4
  110. package/functions/partials/{tsFor.js → tsFor.mjs} +4 -6
  111. package/functions/partials/{tsFor.test.js → tsFor.test.mjs} +5 -4
  112. package/functions/partials.mjs +23 -0
  113. package/functions/{partials.test.js → partials.test.mjs} +1 -1
  114. package/functions/sass.mjs +4 -0
  115. package/functions/{sass.test.js → sass.test.mjs} +4 -3
  116. package/functions/test-helpers/{setUp.js → setUp.mjs} +25 -27
  117. package/functions/test-helpers/setUp.test.mjs +19 -0
  118. package/functions/{testFull.js → testFull.mjs} +4 -6
  119. package/functions/testFull.test.mjs +17 -0
  120. package/functions/{testHelpers.js → testHelpers.mjs} +1 -6
  121. package/functions/testHelpers.test.mjs +7 -0
  122. package/functions/{testQuick.js → testQuick.mjs} +4 -6
  123. package/functions/testQuick.test.mjs +17 -0
  124. package/functions/{typeScript.js → typeScript.mjs} +2 -4
  125. package/functions/typeScript.test.mjs +11 -0
  126. package/functions/utilities/{dotGet.js → dotGet.mjs} +4 -6
  127. package/functions/utilities/{dotNotate.js → dotNotate.mjs} +2 -4
  128. package/functions/utilities/{dotSet.js → dotSet.mjs} +4 -6
  129. package/functions/utilities/{isObject.js → isObject.mjs} +1 -3
  130. package/functions/utilities/{strAfter.js → strAfter.mjs} +11 -13
  131. package/functions/utilities/{strBefore.js → strBefore.mjs} +11 -13
  132. package/functions/{watchFull.js → watchFull.mjs} +2 -4
  133. package/functions/{watchFull.test.js → watchFull.test.mjs} +8 -7
  134. package/functions/watchTest.mjs +10 -0
  135. package/functions/{watchTest.test.js → watchTest.test.mjs} +7 -6
  136. package/gulp.config.js +20 -19
  137. package/gulp.config.mjs +252 -0
  138. package/gulpfile.base.js +20 -20
  139. package/gulpfile.base.mjs +27 -0
  140. package/package.json +27 -13
  141. package/functions/bundleMinify.js +0 -11
  142. package/functions/bundleMinify.test.js +0 -14
  143. package/functions/compileReadme.js +0 -11
  144. package/functions/copyFonts.js +0 -11
  145. package/functions/default.js +0 -14
  146. package/functions/distMinify.js +0 -11
  147. package/functions/distMinify.test.js +0 -14
  148. package/functions/partials/beginWatcher.js +0 -11
  149. package/functions/partials/clean.js +0 -15
  150. package/functions/partials/distFor.js +0 -17
  151. package/functions/partials/minifyFor.js +0 -15
  152. package/functions/partials/readmeTemplate.js +0 -14
  153. package/functions/partials/sassFor.js +0 -21
  154. package/functions/partials.js +0 -40
  155. package/functions/sass.js +0 -6
  156. package/functions/test-helpers/setUp.test.js +0 -18
  157. package/functions/testFull.test.js +0 -16
  158. package/functions/testHelpers.test.js +0 -7
  159. package/functions/testQuick.test.js +0 -16
  160. package/functions/typeScript.test.js +0 -10
  161. package/functions/watchTest.js +0 -12
  162. package/vendor/array-union/index.js +0 -31
  163. package/vendor/easy-transform-stream/index.js +0 -54
  164. package/vendor/globby/gitignore.js +0 -96
  165. package/vendor/globby/index.js +0 -191
  166. package/vendor/globby/node_modules/slash/index.js +0 -16
  167. package/vendor/globby/stream-utils.js +0 -58
  168. package/vendor/globby/to-path.js +0 -20
  169. package/vendor/gulp-imagemin/index.js +0 -124
  170. package/vendor/gulp-imagemin/node_modules/chalk/source/index.js +0 -265
  171. package/vendor/gulp-imagemin/node_modules/chalk/source/utilities.js +0 -36
  172. package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
  173. package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
  174. package/vendor/gulp-plugin-extras/index.js +0 -42
  175. package/vendor/gulp-plugin-extras/node_modules/chalk/source/index.js +0 -265
  176. package/vendor/gulp-plugin-extras/node_modules/chalk/source/utilities.js +0 -36
  177. package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
  178. package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
  179. package/vendor/gulp-plugin-extras/plugin-error.js +0 -145
  180. package/vendor/ignore/index.js +0 -468
  181. package/vendor/imagemin/index.js +0 -90
  182. package/vendor/imagemin-gifsicle/index.js +0 -33
  183. package/vendor/imagemin-mozjpeg/index.js +0 -100
  184. package/vendor/imagemin-mozjpeg/node_modules/execa/index.js +0 -260
  185. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/command.js +0 -47
  186. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/error.js +0 -102
  187. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/kill.js +0 -123
  188. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/promise.js +0 -47
  189. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stdio.js +0 -50
  190. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stream.js +0 -124
  191. package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/core.js +0 -238
  192. package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/main.js +0 -89
  193. package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/realtime.js +0 -24
  194. package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/signals.js +0 -44
  195. package/vendor/imagemin-mozjpeg/node_modules/is-stream/index.js +0 -25
  196. package/vendor/imagemin-mozjpeg/node_modules/mimic-fn/index.js +0 -70
  197. package/vendor/imagemin-mozjpeg/node_modules/npm-run-path/index.js +0 -52
  198. package/vendor/imagemin-mozjpeg/node_modules/onetime/index.js +0 -43
  199. package/vendor/imagemin-mozjpeg/node_modules/path-key/index.js +0 -20
  200. package/vendor/imagemin-mozjpeg/node_modules/strip-final-newline/index.js +0 -17
  201. package/vendor/imagemin-optipng/index.js +0 -44
  202. package/vendor/imagemin-svgo/index.js +0 -27
  203. package/vendor/is-jpg/index.js +0 -12
  204. package/vendor/junk/index.js +0 -49
  205. package/vendor/mozjpeg/index.js +0 -9
  206. package/vendor/mozjpeg/lib/index.js +0 -18
  207. package/vendor/mozjpeg/package.json +0 -49
  208. package/vendor/mozjpeg/vendor/cjpeg +0 -0
  209. package/vendor/mozjpeg/vendor/source/mozjpeg.tar.gz +0 -0
  210. package/vendor/p-pipe/index.js +0 -22
  211. package/vendor/plur/index.js +0 -32
  212. package/vendor/pretty-bytes/index.js +0 -71
  213. package/vendor/slash/index.js +0 -12
@@ -1,12 +1,38 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/esnext.weak-map.delete-all.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "afterEach", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return setUp.afterEach;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, "beforeEach", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return setUp.beforeEach;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, "createTempDir", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return setUp.createTempDir;
23
+ }
24
+ });
25
+ exports.setUp = exports.setDefaults = exports.gulpConfig = void 0;
26
+ var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
27
+ exports.gulpConfig = gulpConfig;
28
+ var setUp = _interopRequireWildcard(require("test-filesystem"));
29
+ exports.setUp = setUp;
30
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
31
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
3
32
  // Import the configurations and override some of them to direct to the temp directory.
4
- const gulpConfig = require('../../gulp.config.js');
5
- const {
6
- setUp
7
- } = require('test-filesystem');
33
+
8
34
  let tempDir = 'test-temp/';
9
- let srcPath = "".concat(tempDir, "src");
35
+ let srcPath = `${tempDir}src`;
10
36
 
11
37
  /**
12
38
  * Update the gulp configurations with the test data. Set the test directory where temp files will be created for testing.
@@ -15,55 +41,32 @@ let srcPath = "".concat(tempDir, "src");
15
41
  */
16
42
  const setDefaults = function () {
17
43
  let testDir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'test-temp';
18
- tempDir = "".concat(testDir, "/");
19
- srcPath = "".concat(tempDir, "src");
44
+ tempDir = `${testDir}/`;
45
+ srcPath = `${tempDir}src`;
20
46
  setUp.setDefaults(tempDir);
21
- const distPath = "".concat(tempDir, "dist");
22
- const browserPath = "".concat(tempDir, "browser");
23
- const sassPath = "".concat(tempDir, "sass");
24
- gulpConfig.set('browser.from', "".concat(distPath, "/**/*.js"));
47
+ const distPath = `${tempDir}dist`;
48
+ const browserPath = `${tempDir}browser`;
49
+ const sassPath = `${tempDir}sass`;
50
+ gulpConfig.set('browser.from', `${distPath}/**/*.js`);
25
51
  gulpConfig.set('browser.to', browserPath);
26
52
  gulpConfig.set('cleanPaths', [distPath, browserPath]);
27
- gulpConfig.set('dist.from', "".concat(srcPath, "/**/!(*.test).js"));
28
- gulpConfig.set('dist.main', "".concat(distPath, "/main"));
53
+ gulpConfig.set('dist.from', `${srcPath}/**/!(*.test).js`);
54
+ gulpConfig.set('dist.main', `${distPath}/main`);
29
55
  gulpConfig.set('dist.to', distPath);
30
- gulpConfig.set('fonts.from', "".concat(srcPath, "/fonts/**/*"));
31
- gulpConfig.set('fonts.to', "".concat(browserPath, "/fonts"));
32
- gulpConfig.set('images.from', "".concat(srcPath, "/img/**/*.+(png|jpg|jpeg|gif|svg)"));
33
- gulpConfig.set('images.to', "".concat(browserPath, "/img"));
34
- gulpConfig.set('readme.template', "".concat(tempDir, "MAIN.md"));
56
+ gulpConfig.set('fonts.from', `${srcPath}/fonts/**/*`);
57
+ gulpConfig.set('fonts.to', `${browserPath}/fonts`);
58
+ gulpConfig.set('images.from', `${srcPath}/img/**/*.+(png|jpg|jpeg|gif|svg)`);
59
+ gulpConfig.set('images.to', `${browserPath}/img`);
60
+ gulpConfig.set('readme.template', `${tempDir}MAIN.md`);
35
61
  gulpConfig.set('readme.to', tempDir);
36
- gulpConfig.set('readme.from', "".concat(srcPath, "/**/!(*.test).js"));
62
+ gulpConfig.set('readme.from', `${srcPath}/**/!(*.test).js`);
37
63
  gulpConfig.set('rootPath', tempDir);
38
- gulpConfig.set('sass.from', "".concat(sassPath, "/**/*.+(scss|sass)"));
64
+ gulpConfig.set('sass.from', `${sassPath}/**/*.+(scss|sass)`);
39
65
  gulpConfig.set('sass.path', sassPath);
40
- gulpConfig.set('sass.to', "".concat(browserPath, "/css"));
66
+ gulpConfig.set('sass.to', `${browserPath}/css`);
41
67
  gulpConfig.set('srcPath', srcPath);
42
- gulpConfig.set('typescript.from', "".concat(srcPath, "/**/*.ts"));
68
+ gulpConfig.set('typescript.from', `${srcPath}/**/*.ts`);
43
69
  gulpConfig.set('typescript.to', distPath);
44
- gulpConfig.set('test.watch', "".concat(srcPath, "/**/*.js"));
70
+ gulpConfig.set('test.watch', `${srcPath}/**/*.js`);
45
71
  };
46
- exports.setDefaults = setDefaults;
47
- exports.gulpConfig = gulpConfig;
48
-
49
- /**
50
- * Ensure that the del has completed, recursively attempt to delete and recreate
51
- * @memberOf module:testHelpers
52
- * @param {boolean} [exists=true]
53
- * @returns {Promise<*|void>}
54
- */
55
- exports.createTempDir = setUp.createTempDir;
56
-
57
- /**
58
- * In the Jest.beforeEach function call this one to set up the temp directory.
59
- * @memberOf module:testHelpers
60
- * @returns {Promise<*|void>}
61
- */
62
- exports.beforeEach = setUp.beforeEach;
63
-
64
- /**
65
- * In the Jest.afterEach function call this one to clean up and remove the temp directory.
66
- * @memberOf module:testHelpers
67
- * @returns {Promise<*>}
68
- */
69
- exports.afterEach = setUp.afterEach;
72
+ exports.setDefaults = setDefaults;
package/dist/testFull.js CHANGED
@@ -1,10 +1,15 @@
1
1
  'use strict'
2
2
 
3
- const gulpConfig = require('../gulp.config.js')
4
- const {
5
- runCLI
6
- } = require('jest')
7
-
3
+ require('core-js/modules/esnext.weak-map.delete-all.js')
4
+ Object.defineProperty(exports, '__esModule', {
5
+ value: true
6
+ })
7
+ exports.testFull = void 0
8
+ var gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
+ var _jest = _interopRequireDefault(require('jest'))
10
+ function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
11
+ function _getRequireWildcardCache (e) { if (typeof WeakMap !== 'function') return null; var r = new WeakMap(); var t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r })(e) }
12
+ function _interopRequireWildcard (e, r) { if (!r && e && e.__esModule) return e; if (e === null || typeof e !== 'object' && typeof e !== 'function') return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }; var a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (u !== 'default' && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u] } return n.default = e, t && t.set(e, n), n }
8
13
  /**
9
14
  * Run all tests with jest.
10
15
  * Configure where tests are located by using 'testPath'.
@@ -17,6 +22,6 @@ const testFull = () => {
17
22
  // The testPath must be an array of strings
18
23
  testPath = [testPath]
19
24
  }
20
- return runCLI(gulpConfig.get('test.options'), testPath)
25
+ return _jest.default.runCLI(gulpConfig.get('test.options'), testPath)
21
26
  }
22
- module.exports = testFull
27
+ exports.testFull = testFull
@@ -1 +1 @@
1
- "use strict";const gulpConfig=require("../gulp.config.js"),{runCLI:runCLI}=require("jest"),testFull=()=>{let t=gulpConfig.get("test.path");return Array.isArray(t)||(t=[t]),runCLI(gulpConfig.get("test.options"),t)};module.exports=testFull;
1
+ "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testFull=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_jest=_interopRequireDefault(require("jest"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var u={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(u,i,l):u[i]=e[i]}return u.default=e,r&&r.set(e,u),u}const testFull=()=>{let e=gulpConfig.get("test.path");return Array.isArray(e)||(e=[e]),_jest.default.runCLI(gulpConfig.get("test.options"),e)};exports.testFull=testFull;
@@ -1,15 +1,11 @@
1
1
  'use strict'
2
2
 
3
- /**
4
- * Export the setUp helper.
5
- * @file
6
- * @author Joshua Heagle <joshuaheagle@gmail.com>
7
- * @version 3.0.0
8
- * @module testHelpers
9
- * @memberOf module:js-build-tools
10
- */
11
-
12
- const setUp = require('./test-helpers/setUp')
13
- module.exports = {
14
- setUp
15
- }
3
+ require('core-js/modules/esnext.weak-map.delete-all.js')
4
+ Object.defineProperty(exports, '__esModule', {
5
+ value: true
6
+ })
7
+ exports.testHelpers = void 0
8
+ var _testHelpers = _interopRequireWildcard(require('./test-helpers/setUp.js'))
9
+ exports.testHelpers = _testHelpers
10
+ function _getRequireWildcardCache (e) { if (typeof WeakMap !== 'function') return null; var r = new WeakMap(); var t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r })(e) }
11
+ function _interopRequireWildcard (e, r) { if (!r && e && e.__esModule) return e; if (e === null || typeof e !== 'object' && typeof e !== 'function') return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }; var a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (u !== 'default' && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u] } return n.default = e, t && t.set(e, n), n }
@@ -1 +1 @@
1
- "use strict";const setUp=require("./test-helpers/setUp");module.exports={setUp:setUp};
1
+ "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testHelpers=void 0;var _testHelpers=_interopRequireWildcard(require("./test-helpers/setUp.js"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var a=i?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(n,u,a):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}exports.testHelpers=_testHelpers;
package/dist/testQuick.js CHANGED
@@ -1,10 +1,15 @@
1
1
  'use strict'
2
2
 
3
- const gulpConfig = require('../gulp.config.js')
4
- const {
5
- runCLI
6
- } = require('jest')
7
-
3
+ require('core-js/modules/esnext.weak-map.delete-all.js')
4
+ Object.defineProperty(exports, '__esModule', {
5
+ value: true
6
+ })
7
+ exports.testQuick = void 0
8
+ var gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
+ var _jest = _interopRequireDefault(require('jest'))
10
+ function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
11
+ function _getRequireWildcardCache (e) { if (typeof WeakMap !== 'function') return null; var r = new WeakMap(); var t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r })(e) }
12
+ function _interopRequireWildcard (e, r) { if (!r && e && e.__esModule) return e; if (e === null || typeof e !== 'object' && typeof e !== 'function') return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }; var a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (u !== 'default' && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u] } return n.default = e, t && t.set(e, n), n }
8
13
  /**
9
14
  * Run the Jest tests for files which have been modified (based on git status).
10
15
  * Configure where tests are located by using 'testPath'.
@@ -17,8 +22,8 @@ const testQuick = () => {
17
22
  // The testPath must be an array of strings
18
23
  testPath = [testPath]
19
24
  }
20
- return runCLI({
25
+ return _jest.default.runCLI({
21
26
  onlyChanged: true
22
27
  }, testPath)
23
28
  }
24
- module.exports = testQuick
29
+ exports.testQuick = testQuick
@@ -1 +1 @@
1
- "use strict";const gulpConfig=require("../gulp.config.js"),{runCLI:runCLI}=require("jest"),testQuick=()=>{let e=gulpConfig.get("test.path");return Array.isArray(e)||(e=[e]),runCLI({onlyChanged:!0},e)};module.exports=testQuick;
1
+ "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testQuick=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_jest=_interopRequireDefault(require("jest"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var u={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&{}.hasOwnProperty.call(e,n)){var o=i?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(u,n,o):u[n]=e[n]}return u.default=e,r&&r.set(e,u),u}const testQuick=()=>{let e=gulpConfig.get("test.path");return Array.isArray(e)||(e=[e]),_jest.default.runCLI({onlyChanged:!0},e)};exports.testQuick=testQuick;
@@ -1,11 +1,13 @@
1
1
  'use strict'
2
2
 
3
- const tsFor = require('./partials/tsFor')
4
-
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.typeScript = void 0
7
+ var _tsFor = require('./partials/tsFor.js')
5
8
  /**
6
9
  * Simplified typescript task using tsFor.
7
10
  * @memberOf module:js-build-tools
8
11
  * @returns {Function}
9
12
  */
10
- const typeScript = tsFor()
11
- module.exports = typeScript
13
+ const typeScript = exports.typeScript = (0, _tsFor.tsFor)()
@@ -1 +1 @@
1
- "use strict";const tsFor=require("./partials/tsFor"),typeScript=tsFor();module.exports=typeScript;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.typeScript=void 0;var _tsFor=require("./partials/tsFor.js");const typeScript=exports.typeScript=(0,_tsFor.tsFor)();
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
 
3
- const isObject = require('./isObject');
4
- const strAfter = require('./strAfter');
5
- const strBefore = require('./strBefore');
6
-
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.dotGet = void 0;
7
+ var _isObject = require("./isObject.js");
8
+ var _strAfter = require("./strAfter.js");
9
+ var _strBefore = require("./strBefore.js");
7
10
  /**
8
11
  * Get a nested property value from an object.
9
12
  * Original source concepts from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/objects/dotGet.ts Sí, funciona}
@@ -14,7 +17,7 @@ const strBefore = require('./strBefore');
14
17
  */
15
18
  const dotGet = function (arrayObject, dotNotation) {
16
19
  let defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
17
- let key = strBefore(dotNotation, '.');
20
+ let key = (0, _strBefore.strBefore)(dotNotation, '.');
18
21
  const lastKey = !key;
19
22
  if (lastKey) {
20
23
  key = dotNotation;
@@ -27,24 +30,23 @@ const dotGet = function (arrayObject, dotNotation) {
27
30
  result[wildKey] = wildValue;
28
31
  continue;
29
32
  }
30
- if (!isObject(wildValue)) {
33
+ if (!(0, _isObject.isObject)(wildValue)) {
31
34
  continue;
32
35
  }
33
- result[wildKey] = dotGet(wildValue, strAfter(dotNotation, '.'), defaultValue);
36
+ result[wildKey] = dotGet(wildValue, (0, _strAfter.strAfter)(dotNotation, '.'), defaultValue);
34
37
  }
35
38
  return result;
36
39
  }
37
40
  if (lastKey) {
38
- var _arrayObject$dotNotat;
39
- return (_arrayObject$dotNotat = arrayObject[dotNotation]) !== null && _arrayObject$dotNotat !== void 0 ? _arrayObject$dotNotat : defaultValue;
41
+ return arrayObject[dotNotation] ?? defaultValue;
40
42
  }
41
43
  if (typeof arrayObject[key] === 'undefined') {
42
44
  return defaultValue;
43
45
  }
44
46
  const next = arrayObject[key];
45
- if (!isObject(next)) {
47
+ if (!(0, _isObject.isObject)(next)) {
46
48
  return defaultValue;
47
49
  }
48
- return dotGet(next, strAfter(dotNotation, '.'), defaultValue);
50
+ return dotGet(next, (0, _strAfter.strAfter)(dotNotation, '.'), defaultValue);
49
51
  };
50
- module.exports = dotGet;
52
+ exports.dotGet = dotGet;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.string.replace.js");
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.dotNotate = void 0;
4
7
  require("core-js/modules/esnext.async-iterator.map.js");
5
8
  require("core-js/modules/esnext.iterator.map.js");
6
- const isObject = require('./isObject');
7
-
9
+ var _isObject = require("./isObject.js");
8
10
  /**
9
11
  * Convert an array of keys into a regex, return a function to test if incoming keys match.
10
12
  * @param {Array.<string>} [retainObjects=[]] - An array of keys to retain as objects
@@ -20,7 +22,7 @@ const handleRetainObjects = function () {
20
22
  return (currentKey, value, results) => false;
21
23
  }
22
24
  retainObjects = retainObjects.map(key => key.replace('\.', '\\.'));
23
- const retainRegex = new RegExp("(".concat(retainObjects.join('|'), ")$"));
25
+ const retainRegex = new RegExp(`(${retainObjects.join('|')})$`);
24
26
  /**
25
27
  * Test if a key should be retained as an object.
26
28
  * @param {string} currentKey - The key to test
@@ -50,12 +52,12 @@ const performDotNotate = function (arrayObject, didRetain) {
50
52
  let results = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
51
53
  for (let key in arrayObject) {
52
54
  const value = arrayObject[key];
53
- const currentKey = "".concat(prepend).concat(key);
55
+ const currentKey = `${prepend}${key}`;
54
56
  if (didRetain(currentKey, value, results)) {
55
57
  continue;
56
58
  }
57
- if (isObject(value)) {
58
- performDotNotate(value, didRetain, "".concat(currentKey, "."), results);
59
+ if ((0, _isObject.isObject)(value)) {
60
+ performDotNotate(value, didRetain, `${currentKey}.`, results);
59
61
  continue;
60
62
  }
61
63
  results[currentKey] = value;
@@ -74,4 +76,4 @@ const dotNotate = function (arrayObject) {
74
76
  let retainObjects = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
75
77
  return performDotNotate(arrayObject, handleRetainObjects(retainObjects));
76
78
  };
77
- module.exports = dotNotate;
79
+ exports.dotNotate = dotNotate;
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
 
3
- const isObject = require('./isObject');
4
- const strAfter = require('./strAfter');
5
- const strBefore = require('./strBefore');
6
-
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.dotSet = void 0;
7
+ var _isObject = require("./isObject.js");
8
+ var _strAfter = require("./strAfter.js");
9
+ var _strBefore = require("./strBefore.js");
7
10
  /**
8
11
  * Set a nested property value an object.
9
12
  * Original source concepts from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/objects/dotSet.ts Sí, funciona}
@@ -13,9 +16,8 @@ const strBefore = require('./strBefore');
13
16
  * @returns {Object} The modified object
14
17
  */
15
18
  const dotSet = function (arrayObject, dotNotation) {
16
- var _arrayObject$key;
17
19
  let value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
18
- let key = strBefore(dotNotation, '.');
20
+ let key = (0, _strBefore.strBefore)(dotNotation, '.');
19
21
  const lastKey = !key;
20
22
  if (lastKey) {
21
23
  key = dotNotation;
@@ -26,10 +28,10 @@ const dotSet = function (arrayObject, dotNotation) {
26
28
  arrayObject[wildKey] = value;
27
29
  continue;
28
30
  }
29
- if (!isObject(arrayObject[wildKey])) {
31
+ if (!(0, _isObject.isObject)(arrayObject[wildKey])) {
30
32
  continue;
31
33
  }
32
- dotSet(arrayObject[wildKey], strAfter(dotNotation, '.'), value);
34
+ dotSet(arrayObject[wildKey], (0, _strAfter.strAfter)(dotNotation, '.'), value);
33
35
  }
34
36
  return arrayObject;
35
37
  }
@@ -37,8 +39,8 @@ const dotSet = function (arrayObject, dotNotation) {
37
39
  arrayObject[dotNotation] = value;
38
40
  return arrayObject;
39
41
  }
40
- const next = (_arrayObject$key = arrayObject[key]) !== null && _arrayObject$key !== void 0 ? _arrayObject$key : [];
41
- arrayObject[key] = dotSet(next, strAfter(dotNotation, '.'), value);
42
+ const next = arrayObject[key] ?? [];
43
+ arrayObject[key] = dotSet(next, (0, _strAfter.strAfter)(dotNotation, '.'), value);
42
44
  return arrayObject;
43
45
  };
44
- module.exports = dotSet;
46
+ exports.dotSet = dotSet;
@@ -1,5 +1,9 @@
1
1
  "use strict";
2
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isObject = void 0;
3
7
  /**
4
8
  * Check if the provided thing is an object / array.
5
9
  * Original source concepts from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/objects/isObject.ts Sí, funciona}
@@ -7,4 +11,4 @@
7
11
  * @returns {boolean}
8
12
  */
9
13
  const isObject = object => typeof object === 'object' && object !== null;
10
- module.exports = isObject;
14
+ exports.isObject = isObject;
@@ -1,14 +1,18 @@
1
1
  "use strict";
2
2
 
3
- /**
4
- * Retrieve the string part after the search match.
5
- * Original source from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/strings/strAfter.ts Sí, funciona}
6
- * @param {string} str
7
- * @param {string} search
8
- * @returns {string}
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.strAfter = void 0;
7
+ /**
8
+ * Retrieve the string part after the search match.
9
+ * Original source from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/strings/strAfter.ts Sí, funciona}
10
+ * @param {string} str
11
+ * @param {string} search
12
+ * @returns {string}
9
13
  */
10
14
  const strAfter = (str, search) => {
11
15
  const index = str.indexOf(search);
12
16
  return index === -1 ? '' : str.substring(index + search.length);
13
17
  };
14
- module.exports = strAfter;
18
+ exports.strAfter = strAfter;
@@ -1,14 +1,18 @@
1
1
  "use strict";
2
2
 
3
- /**
4
- * Retrieve the string part before the search match.
5
- * Original source from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/strings/strBefore.ts Sí, funciona}
6
- * @param {string} str
7
- * @param {string} search
8
- * @returns {string}
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.strBefore = void 0;
7
+ /**
8
+ * Retrieve the string part before the search match.
9
+ * Original source from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/strings/strBefore.ts Sí, funciona}
10
+ * @param {string} str
11
+ * @param {string} search
12
+ * @returns {string}
9
13
  */
10
14
  const strBefore = (str, search) => {
11
15
  const index = str.indexOf(search);
12
16
  return index === -1 ? '' : str.slice(0, index);
13
17
  };
14
- module.exports = strBefore;
18
+ exports.strBefore = strBefore;
package/dist/watchFull.js CHANGED
@@ -1,14 +1,14 @@
1
1
  'use strict'
2
2
 
3
- const {
4
- beginWatcher,
5
- runOnChange
6
- } = require('./partials')
7
-
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.watchFull = void 0
7
+ var _partials = require('./partials.js')
8
8
  /**
9
9
  * Watch for changes and run the distribution for the changed files, then bundle and test the changed files.
10
10
  * @memberOf module:js-build-tools
11
11
  * @returns {FSWatcher}
12
12
  */
13
- const watchFull = () => beginWatcher().on('change', runOnChange)
14
- module.exports = watchFull
13
+ const watchFull = () => (0, _partials.beginWatcher)().on('change', _partials.runOnChange)
14
+ exports.watchFull = watchFull
@@ -1 +1 @@
1
- "use strict";const{beginWatcher:beginWatcher,runOnChange:runOnChange}=require("./partials"),watchFull=()=>beginWatcher().on("change",runOnChange);module.exports=watchFull;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.watchFull=void 0;var _partials=require("./partials.js");const watchFull=()=>(0,_partials.beginWatcher)().on("change",_partials.runOnChange);exports.watchFull=watchFull;
package/dist/watchTest.js CHANGED
@@ -1,17 +1,21 @@
1
1
  'use strict'
2
2
 
3
- const gulpConfig = require('../gulp.config.js')
4
- const {
5
- watch
6
- } = require('gulp')
7
- const testQuick = require('./testQuick')
8
-
3
+ require('core-js/modules/esnext.weak-map.delete-all.js')
4
+ Object.defineProperty(exports, '__esModule', {
5
+ value: true
6
+ })
7
+ exports.watchTest = void 0
8
+ var gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
+ var _gulp = require('gulp')
10
+ var _testQuick = require('./testQuick.js')
11
+ function _getRequireWildcardCache (e) { if (typeof WeakMap !== 'function') return null; var r = new WeakMap(); var t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r })(e) }
12
+ function _interopRequireWildcard (e, r) { if (!r && e && e.__esModule) return e; if (e === null || typeof e !== 'object' && typeof e !== 'function') return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }; var a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (u !== 'default' && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u] } return n.default = e, t && t.set(e, n), n }
9
13
  /**
10
14
  * Watch for changes and run the tests.
11
15
  * @memberOf module:js-build-tools
12
16
  * @returns {*}
13
17
  */
14
- const watchTest = () => watch(gulpConfig.get('test.watch'), {
18
+ const watchTest = () => (0, _gulp.watch)(gulpConfig.get('test.watch'), {
15
19
  ignoreInitial: false
16
- }, testQuick)
17
- module.exports = watchTest
20
+ }, _testQuick.testQuick)
21
+ exports.watchTest = watchTest
@@ -1 +1 @@
1
- "use strict";const gulpConfig=require("../gulp.config.js"),{watch:watch}=require("gulp"),testQuick=require("./testQuick"),watchTest=()=>watch(gulpConfig.get("test.watch"),{ignoreInitial:!1},testQuick);module.exports=watchTest;
1
+ "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.watchTest=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_gulp=require("gulp"),_testQuick=require("./testQuick.js");function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var i={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&{}.hasOwnProperty.call(e,n)){var a=u?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(i,n,a):i[n]=e[n]}return i.default=e,r&&r.set(e,i),i}const watchTest=()=>(0,_gulp.watch)(gulpConfig.get("test.watch"),{ignoreInitial:!1},_testQuick.testQuick);exports.watchTest=watchTest;
@@ -1,16 +1,16 @@
1
- const bundle = require('./bundle')
2
- const bundleLint = require('./bundleLint')
3
- const bundleMinify = require('./bundleMinify')
4
- const { clean, distSeries } = require('./partials')
5
- const compileReadme = require('./compileReadme')
6
- const distLint = require('./distLint')
7
- const distMinify = require('./distMinify')
8
- const { parallel, series } = require('gulp')
9
- const gulpConfig = require('../gulp.config.js')
10
- const copyFonts = require('./copyFonts.js')
11
- const images = require('./images.js')
12
- const sass = require('./sass.js')
13
- const testFull = require('./testFull')
1
+ import { bundle } from './bundle.mjs'
2
+ import { bundleLint } from './bundleLint.mjs'
3
+ import { bundleMinify } from './bundleMinify.mjs'
4
+ import { clean, distSeries } from './partials.mjs'
5
+ import { compileReadme } from './compileReadme.mjs'
6
+ import { distLint } from './distLint.mjs'
7
+ import { distMinify } from './distMinify.mjs'
8
+ import { parallel, series } from 'gulp'
9
+ import * as gulpConfig from '../gulp.config.mjs'
10
+ import { copyFonts } from './copyFonts.mjs'
11
+ import { images } from './images.mjs'
12
+ import { sass } from './sass.mjs'
13
+ import { testFull } from './testFull.mjs'
14
14
 
15
15
  /**
16
16
  * Runs several processes to build and validate the project.
@@ -18,7 +18,7 @@ const testFull = require('./testFull')
18
18
  * @memberOf module:js-build-tools
19
19
  * @returns {stream.Stream}
20
20
  */
21
- const build = (done = null) => {
21
+ export const build = (done = null) => {
22
22
  const distLintMinify = parallel(distLint, distMinify)
23
23
  const bundleLintMinify = parallel(bundleLint, bundleMinify)
24
24
  const buildActions = [clean, distSeries(), distLintMinify]
@@ -55,5 +55,3 @@ const build = (done = null) => {
55
55
  ...runActions
56
56
  )(done)
57
57
  }
58
-
59
- module.exports = build
@@ -1,16 +1,17 @@
1
- const fs = require('fs')
2
- const setUp = require('./test-helpers/setUp')
1
+ import fs from 'fs'
2
+ import * as setUp from './test-helpers/setUp.mjs'
3
+ import { build } from './build.mjs'
4
+ import { clean } from './partials/clean.mjs'
5
+ import { testFull } from './testFull.mjs'
6
+ import { countMatches } from 'test-filesystem'
7
+
3
8
  setUp.setDefaults('test-build')
4
9
  const gulpConfig = setUp.gulpConfig
5
- const build = require('./build')
6
- const clean = require('./partials/clean')
7
- const testFull = require('./testFull')
8
- const { countMatches } = require('test-filesystem')
9
10
 
10
11
  const genericFunction = () => Promise.resolve(true)
11
12
 
12
- jest.mock('./partials/clean', () => jest.fn(genericFunction))
13
- jest.mock('./testFull', () => jest.fn(genericFunction))
13
+ jest.mock('./partials/clean.mjs', () => ({ clean: jest.fn(genericFunction) }))
14
+ jest.mock('./testFull.mjs', () => ({ testFull: jest.fn(genericFunction) }))
14
15
 
15
16
  const file1Contents = '/**\n' +
16
17
  ' * Console log out a greeting with given input.\n' +