js-build-tools 3.0.3 → 4.0.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 (213) hide show
  1. package/README.md +431 -691
  2. package/babel.config.js +1 -1
  3. package/dist/build.js +58 -59
  4. package/dist/build.min.js +1 -1
  5. package/dist/bundle.js +17 -12
  6. package/dist/bundle.min.js +1 -1
  7. package/dist/bundleLint.js +21 -17
  8. package/dist/bundleLint.min.js +1 -1
  9. package/dist/bundleMinify.js +14 -8
  10. package/dist/bundleMinify.min.js +1 -1
  11. package/dist/compileReadme.js +10 -13
  12. package/dist/compileReadme.min.js +1 -1
  13. package/dist/copyFonts.js +14 -8
  14. package/dist/copyFonts.min.js +1 -1
  15. package/dist/default.js +19 -15
  16. package/dist/default.min.js +1 -1
  17. package/dist/dist.js +10 -7
  18. package/dist/dist.min.js +1 -1
  19. package/dist/distLint.js +21 -17
  20. package/dist/distLint.min.js +1 -1
  21. package/dist/distMinify.js +14 -8
  22. package/dist/distMinify.min.js +1 -1
  23. package/dist/images.js +10 -7
  24. package/dist/images.min.js +1 -1
  25. package/dist/partials/addToReadme.js +19 -14
  26. package/dist/partials/beginWatcher.js +14 -10
  27. package/dist/partials/clean.js +17 -11
  28. package/dist/partials/copyFor.js +10 -10
  29. package/dist/partials/distFor.js +27 -17
  30. package/dist/partials/distForSrc.js +16 -10
  31. package/dist/partials/distSeries.js +24 -20
  32. package/dist/partials/imagesFor.js +27 -28
  33. package/dist/partials/minifyFor.js +17 -16
  34. package/dist/partials/readmeTemplate.js +16 -12
  35. package/dist/partials/removeDirectory.js +12 -12
  36. package/dist/partials/runOnChange.js +30 -28
  37. package/dist/partials/sassFor.js +28 -21
  38. package/dist/partials/tsFor.js +24 -21
  39. package/dist/partials.js +103 -41
  40. package/dist/partials.min.js +1 -1
  41. package/dist/sass.js +10 -7
  42. package/dist/sass.min.js +1 -1
  43. package/dist/test-helpers/setUp.js +68 -65
  44. package/dist/testFull.js +22 -17
  45. package/dist/testFull.min.js +1 -1
  46. package/dist/testHelpers.js +11 -15
  47. package/dist/testHelpers.min.js +1 -1
  48. package/dist/testQuick.js +24 -19
  49. package/dist/testQuick.min.js +1 -1
  50. package/dist/typeScript.js +9 -7
  51. package/dist/typeScript.min.js +1 -1
  52. package/dist/utilities/dotGet.js +45 -43
  53. package/dist/utilities/dotNotate.js +53 -51
  54. package/dist/utilities/dotSet.js +39 -37
  55. package/dist/utilities/isObject.js +9 -5
  56. package/dist/utilities/strAfter.js +18 -14
  57. package/dist/utilities/strBefore.js +18 -14
  58. package/dist/watchFull.js +10 -10
  59. package/dist/watchFull.min.js +1 -1
  60. package/dist/watchTest.js +17 -13
  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 +20 -14
  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
package/dist/partials.js CHANGED
@@ -1,41 +1,103 @@
1
- 'use strict'
2
-
3
- /**
4
- * Micro-functions used as components for the main gulp functions.
5
- * @file
6
- * @author Joshua Heagle <joshuaheagle@gmail.com>
7
- * @version 3.0.0
8
- * @module partials
9
- * @memberOf module:js-build-tools
10
- */
11
-
12
- const addToReadme = require('./partials/addToReadme')
13
- const beginWatcher = require('./partials/beginWatcher')
14
- const clean = require('./partials/clean')
15
- const copyFor = require('./partials/copyFor')
16
- const distFor = require('./partials/distFor')
17
- const distForSrc = require('./partials/distForSrc')
18
- const distSeries = require('./partials/distSeries')
19
- const imagesFor = require('./partials/imagesFor.js')
20
- const minifyFor = require('./partials/minifyFor')
21
- const readmeTemplate = require('./partials/readmeTemplate')
22
- const removeDirectory = require('./partials/removeDirectory')
23
- const runOnChange = require('./partials/runOnChange')
24
- const sassFor = require('./partials/sassFor')
25
- const tsFor = require('./partials/tsFor')
26
- module.exports = {
27
- addToReadme,
28
- beginWatcher,
29
- clean,
30
- copyFor,
31
- distFor,
32
- distForSrc,
33
- distSeries,
34
- imagesFor,
35
- minifyFor,
36
- readmeTemplate,
37
- removeDirectory,
38
- runOnChange,
39
- sassFor,
40
- tsFor
41
- }
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ Object.defineProperty(exports, 'addToReadme', {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _addToReadme.addToReadme
10
+ }
11
+ })
12
+ Object.defineProperty(exports, 'beginWatcher', {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _beginWatcher.beginWatcher
16
+ }
17
+ })
18
+ Object.defineProperty(exports, 'clean', {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _clean.clean
22
+ }
23
+ })
24
+ Object.defineProperty(exports, 'copyFor', {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _copyFor.copyFor
28
+ }
29
+ })
30
+ Object.defineProperty(exports, 'distFor', {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _distFor.distFor
34
+ }
35
+ })
36
+ Object.defineProperty(exports, 'distForSrc', {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _distForSrc.distForSrc
40
+ }
41
+ })
42
+ Object.defineProperty(exports, 'distSeries', {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _distSeries.distSeries
46
+ }
47
+ })
48
+ Object.defineProperty(exports, 'imagesFor', {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _imagesFor.imagesFor
52
+ }
53
+ })
54
+ Object.defineProperty(exports, 'minifyFor', {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _minifyFor.minifyFor
58
+ }
59
+ })
60
+ Object.defineProperty(exports, 'readmeTemplate', {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _readmeTemplate.readmeTemplate
64
+ }
65
+ })
66
+ Object.defineProperty(exports, 'removeDirectory', {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _removeDirectory.removeDirectory
70
+ }
71
+ })
72
+ Object.defineProperty(exports, 'runOnChange', {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _runOnChange.runOnChange
76
+ }
77
+ })
78
+ Object.defineProperty(exports, 'sassFor', {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _sassFor.sassFor
82
+ }
83
+ })
84
+ Object.defineProperty(exports, 'tsFor', {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _tsFor.tsFor
88
+ }
89
+ })
90
+ var _addToReadme = require('./partials/addToReadme.js')
91
+ var _beginWatcher = require('./partials/beginWatcher.js')
92
+ var _clean = require('./partials/clean.js')
93
+ var _copyFor = require('./partials/copyFor.js')
94
+ var _distFor = require('./partials/distFor.js')
95
+ var _distForSrc = require('./partials/distForSrc.js')
96
+ var _distSeries = require('./partials/distSeries.js')
97
+ var _imagesFor = require('./partials/imagesFor.js')
98
+ var _minifyFor = require('./partials/minifyFor.js')
99
+ var _readmeTemplate = require('./partials/readmeTemplate.js')
100
+ var _removeDirectory = require('./partials/removeDirectory.js')
101
+ var _runOnChange = require('./partials/runOnChange.js')
102
+ var _sassFor = require('./partials/sassFor.js')
103
+ var _tsFor = require('./partials/tsFor.js')
@@ -1 +1 @@
1
- "use strict";const addToReadme=require("./partials/addToReadme"),beginWatcher=require("./partials/beginWatcher"),clean=require("./partials/clean"),copyFor=require("./partials/copyFor"),distFor=require("./partials/distFor"),distForSrc=require("./partials/distForSrc"),distSeries=require("./partials/distSeries"),imagesFor=require("./partials/imagesFor.js"),minifyFor=require("./partials/minifyFor"),readmeTemplate=require("./partials/readmeTemplate"),removeDirectory=require("./partials/removeDirectory"),runOnChange=require("./partials/runOnChange"),sassFor=require("./partials/sassFor"),tsFor=require("./partials/tsFor");module.exports={addToReadme:addToReadme,beginWatcher:beginWatcher,clean:clean,copyFor:copyFor,distFor:distFor,distForSrc:distForSrc,distSeries:distSeries,imagesFor:imagesFor,minifyFor:minifyFor,readmeTemplate:readmeTemplate,removeDirectory:removeDirectory,runOnChange:runOnChange,sassFor:sassFor,tsFor:tsFor};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"addToReadme",{enumerable:!0,get:function(){return _addToReadme.addToReadme}}),Object.defineProperty(exports,"beginWatcher",{enumerable:!0,get:function(){return _beginWatcher.beginWatcher}}),Object.defineProperty(exports,"clean",{enumerable:!0,get:function(){return _clean.clean}}),Object.defineProperty(exports,"copyFor",{enumerable:!0,get:function(){return _copyFor.copyFor}}),Object.defineProperty(exports,"distFor",{enumerable:!0,get:function(){return _distFor.distFor}}),Object.defineProperty(exports,"distForSrc",{enumerable:!0,get:function(){return _distForSrc.distForSrc}}),Object.defineProperty(exports,"distSeries",{enumerable:!0,get:function(){return _distSeries.distSeries}}),Object.defineProperty(exports,"imagesFor",{enumerable:!0,get:function(){return _imagesFor.imagesFor}}),Object.defineProperty(exports,"minifyFor",{enumerable:!0,get:function(){return _minifyFor.minifyFor}}),Object.defineProperty(exports,"readmeTemplate",{enumerable:!0,get:function(){return _readmeTemplate.readmeTemplate}}),Object.defineProperty(exports,"removeDirectory",{enumerable:!0,get:function(){return _removeDirectory.removeDirectory}}),Object.defineProperty(exports,"runOnChange",{enumerable:!0,get:function(){return _runOnChange.runOnChange}}),Object.defineProperty(exports,"sassFor",{enumerable:!0,get:function(){return _sassFor.sassFor}}),Object.defineProperty(exports,"tsFor",{enumerable:!0,get:function(){return _tsFor.tsFor}});var _addToReadme=require("./partials/addToReadme.js"),_beginWatcher=require("./partials/beginWatcher.js"),_clean=require("./partials/clean.js"),_copyFor=require("./partials/copyFor.js"),_distFor=require("./partials/distFor.js"),_distForSrc=require("./partials/distForSrc.js"),_distSeries=require("./partials/distSeries.js"),_imagesFor=require("./partials/imagesFor.js"),_minifyFor=require("./partials/minifyFor.js"),_readmeTemplate=require("./partials/readmeTemplate.js"),_removeDirectory=require("./partials/removeDirectory.js"),_runOnChange=require("./partials/runOnChange.js"),_sassFor=require("./partials/sassFor.js"),_tsFor=require("./partials/tsFor.js");
package/dist/sass.js CHANGED
@@ -1,7 +1,10 @@
1
- 'use strict'
2
-
3
- const sassFor = require('./partials/sassFor')
4
-
5
- // Compile sass into CSS & auto-inject into browsers
6
- const sass = () => sassFor()
7
- module.exports = sass
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.sass = void 0
7
+ var _sassFor = require('./partials/sassFor.js')
8
+ // Compile sass into CSS & auto-inject into browsers
9
+ const sass = () => (0, _sassFor.sassFor)()
10
+ exports.sass = sass
package/dist/sass.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";const sassFor=require("./partials/sassFor"),sass=()=>sassFor();module.exports=sass;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sass=void 0;var _sassFor=require("./partials/sassFor.js");const sass=()=>(0,_sassFor.sassFor)();exports.sass=sass;
@@ -1,69 +1,72 @@
1
- "use strict";
2
-
3
- // 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');
8
- let tempDir = 'test-temp/';
9
- let srcPath = "".concat(tempDir, "src");
10
-
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
+ 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; }
32
+ // Import the configurations and override some of them to direct to the temp directory.
33
+
34
+ let tempDir = 'test-temp/';
35
+ let srcPath = `${tempDir}src`;
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.
13
39
  * @memberOf module:testHelpers
14
40
  * @param {string} testDir
15
- */
16
- const setDefaults = function () {
17
- let testDir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'test-temp';
18
- tempDir = "".concat(testDir, "/");
19
- srcPath = "".concat(tempDir, "src");
20
- 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"));
25
- gulpConfig.set('browser.to', browserPath);
26
- gulpConfig.set('cleanPaths', [distPath, browserPath]);
27
- gulpConfig.set('dist.from', "".concat(srcPath, "/**/!(*.test).js"));
28
- gulpConfig.set('dist.main', "".concat(distPath, "/main"));
29
- 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"));
35
- gulpConfig.set('readme.to', tempDir);
36
- gulpConfig.set('readme.from', "".concat(srcPath, "/**/!(*.test).js"));
37
- gulpConfig.set('rootPath', tempDir);
38
- gulpConfig.set('sass.from', "".concat(sassPath, "/**/*.+(scss|sass)"));
39
- gulpConfig.set('sass.path', sassPath);
40
- gulpConfig.set('sass.to', "".concat(browserPath, "/css"));
41
- gulpConfig.set('srcPath', srcPath);
42
- gulpConfig.set('typescript.from', "".concat(srcPath, "/**/*.ts"));
43
- gulpConfig.set('typescript.to', distPath);
44
- gulpConfig.set('test.watch', "".concat(srcPath, "/**/*.js"));
45
- };
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;
41
+ */
42
+ const setDefaults = function () {
43
+ let testDir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'test-temp';
44
+ tempDir = `${testDir}/`;
45
+ srcPath = `${tempDir}src`;
46
+ setUp.setDefaults(tempDir);
47
+ const distPath = `${tempDir}dist`;
48
+ const browserPath = `${tempDir}browser`;
49
+ const sassPath = `${tempDir}sass`;
50
+ gulpConfig.set('browser.from', `${distPath}/**/*.js`);
51
+ gulpConfig.set('browser.to', browserPath);
52
+ gulpConfig.set('cleanPaths', [distPath, browserPath]);
53
+ gulpConfig.set('dist.from', `${srcPath}/**/!(*.test).js`);
54
+ gulpConfig.set('dist.main', `${distPath}/main`);
55
+ gulpConfig.set('dist.to', distPath);
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`);
61
+ gulpConfig.set('readme.to', tempDir);
62
+ gulpConfig.set('readme.from', `${srcPath}/**/!(*.test).js`);
63
+ gulpConfig.set('rootPath', tempDir);
64
+ gulpConfig.set('sass.from', `${sassPath}/**/*.+(scss|sass)`);
65
+ gulpConfig.set('sass.path', sassPath);
66
+ gulpConfig.set('sass.to', `${browserPath}/css`);
67
+ gulpConfig.set('srcPath', srcPath);
68
+ gulpConfig.set('typescript.from', `${srcPath}/**/*.ts`);
69
+ gulpConfig.set('typescript.to', distPath);
70
+ gulpConfig.set('test.watch', `${srcPath}/**/*.js`);
71
+ };
72
+ exports.setDefaults = setDefaults;
package/dist/testFull.js CHANGED
@@ -1,22 +1,27 @@
1
- 'use strict'
2
-
3
- const gulpConfig = require('../gulp.config.js')
4
- const {
5
- runCLI
6
- } = require('jest')
7
-
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.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'.
11
16
  * @memberOf module:js-build-tools
12
17
  * @returns {Promise<*>}
13
- */
14
- const testFull = () => {
15
- let testPath = gulpConfig.get('test.path')
16
- if (!Array.isArray(testPath)) {
17
- // The testPath must be an array of strings
18
- testPath = [testPath]
19
- }
20
- return runCLI(gulpConfig.get('test.options'), testPath)
21
- }
22
- module.exports = testFull
18
+ */
19
+ const testFull = () => {
20
+ let testPath = gulpConfig.get('test.path')
21
+ if (!Array.isArray(testPath)) {
22
+ // The testPath must be an array of strings
23
+ testPath = [testPath]
24
+ }
25
+ return _jest.default.runCLI(gulpConfig.get('test.options'), testPath)
26
+ }
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
- 'use strict'
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
- }
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.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,24 +1,29 @@
1
- 'use strict'
2
-
3
- const gulpConfig = require('../gulp.config.js')
4
- const {
5
- runCLI
6
- } = require('jest')
7
-
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.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'.
11
16
  * @memberOf module:js-build-tools
12
17
  * @returns {Promise<*>}
13
- */
14
- const testQuick = () => {
15
- let testPath = gulpConfig.get('test.path')
16
- if (!Array.isArray(testPath)) {
17
- // The testPath must be an array of strings
18
- testPath = [testPath]
19
- }
20
- return runCLI({
21
- onlyChanged: true
22
- }, testPath)
23
- }
24
- module.exports = testQuick
18
+ */
19
+ const testQuick = () => {
20
+ let testPath = gulpConfig.get('test.path')
21
+ if (!Array.isArray(testPath)) {
22
+ // The testPath must be an array of strings
23
+ testPath = [testPath]
24
+ }
25
+ return _jest.default.runCLI({
26
+ onlyChanged: true
27
+ }, testPath)
28
+ }
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
- 'use strict'
2
-
3
- const tsFor = require('./partials/tsFor')
4
-
1
+ 'use strict'
2
+
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
- */
10
- const typeScript = tsFor()
11
- module.exports = typeScript
12
+ */
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
- "use strict";
2
-
3
- const isObject = require('./isObject');
4
- const strAfter = require('./strAfter');
5
- const strBefore = require('./strBefore');
6
-
1
+ "use strict";
2
+
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}
@@ -11,40 +14,39 @@ const strBefore = require('./strBefore');
11
14
  * @param {string} dotNotation - The path to the property
12
15
  * @param {string|null} [defaultValue=null] - The default value to return if the property is not found
13
16
  * @returns {*} The value of the property
14
- */
15
- const dotGet = function (arrayObject, dotNotation) {
16
- let defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
17
- let key = strBefore(dotNotation, '.');
18
- const lastKey = !key;
19
- if (lastKey) {
20
- key = dotNotation;
21
- }
22
- if (key === '*') {
23
- const result = [];
24
- for (let wildKey in arrayObject) {
25
- const wildValue = arrayObject[wildKey];
26
- if (lastKey) {
27
- result[wildKey] = wildValue;
28
- continue;
29
- }
30
- if (!isObject(wildValue)) {
31
- continue;
32
- }
33
- result[wildKey] = dotGet(wildValue, strAfter(dotNotation, '.'), defaultValue);
34
- }
35
- return result;
36
- }
37
- if (lastKey) {
38
- var _arrayObject$dotNotat;
39
- return (_arrayObject$dotNotat = arrayObject[dotNotation]) !== null && _arrayObject$dotNotat !== void 0 ? _arrayObject$dotNotat : defaultValue;
40
- }
41
- if (typeof arrayObject[key] === 'undefined') {
42
- return defaultValue;
43
- }
44
- const next = arrayObject[key];
45
- if (!isObject(next)) {
46
- return defaultValue;
47
- }
48
- return dotGet(next, strAfter(dotNotation, '.'), defaultValue);
49
- };
50
- module.exports = dotGet;
17
+ */
18
+ const dotGet = function (arrayObject, dotNotation) {
19
+ let defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
20
+ let key = (0, _strBefore.strBefore)(dotNotation, '.');
21
+ const lastKey = !key;
22
+ if (lastKey) {
23
+ key = dotNotation;
24
+ }
25
+ if (key === '*') {
26
+ const result = [];
27
+ for (let wildKey in arrayObject) {
28
+ const wildValue = arrayObject[wildKey];
29
+ if (lastKey) {
30
+ result[wildKey] = wildValue;
31
+ continue;
32
+ }
33
+ if (!(0, _isObject.isObject)(wildValue)) {
34
+ continue;
35
+ }
36
+ result[wildKey] = dotGet(wildValue, (0, _strAfter.strAfter)(dotNotation, '.'), defaultValue);
37
+ }
38
+ return result;
39
+ }
40
+ if (lastKey) {
41
+ return arrayObject[dotNotation] ?? defaultValue;
42
+ }
43
+ if (typeof arrayObject[key] === 'undefined') {
44
+ return defaultValue;
45
+ }
46
+ const next = arrayObject[key];
47
+ if (!(0, _isObject.isObject)(next)) {
48
+ return defaultValue;
49
+ }
50
+ return dotGet(next, (0, _strAfter.strAfter)(dotNotation, '.'), defaultValue);
51
+ };
52
+ exports.dotGet = dotGet;