js-build-tools 4.0.0 → 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 (42) hide show
  1. package/README.md +267 -267
  2. package/dist/build.js +58 -58
  3. package/dist/bundle.js +17 -17
  4. package/dist/bundleLint.js +21 -21
  5. package/dist/bundleMinify.js +14 -14
  6. package/dist/compileReadme.js +10 -10
  7. package/dist/copyFonts.js +14 -14
  8. package/dist/default.js +19 -19
  9. package/dist/dist.js +10 -10
  10. package/dist/distLint.js +21 -21
  11. package/dist/distMinify.js +14 -14
  12. package/dist/images.js +10 -10
  13. package/dist/partials/addToReadme.js +18 -18
  14. package/dist/partials/beginWatcher.js +13 -13
  15. package/dist/partials/clean.js +16 -16
  16. package/dist/partials/copyFor.js +9 -9
  17. package/dist/partials/distFor.js +26 -26
  18. package/dist/partials/distForSrc.js +15 -15
  19. package/dist/partials/distSeries.js +23 -23
  20. package/dist/partials/imagesFor.js +26 -26
  21. package/dist/partials/minifyFor.js +16 -16
  22. package/dist/partials/readmeTemplate.js +15 -15
  23. package/dist/partials/removeDirectory.js +11 -11
  24. package/dist/partials/runOnChange.js +29 -29
  25. package/dist/partials/sassFor.js +27 -27
  26. package/dist/partials/tsFor.js +23 -23
  27. package/dist/partials.js +103 -103
  28. package/dist/sass.js +10 -10
  29. package/dist/test-helpers/setUp.js +67 -67
  30. package/dist/testFull.js +22 -22
  31. package/dist/testHelpers.js +11 -11
  32. package/dist/testQuick.js +24 -24
  33. package/dist/typeScript.js +9 -9
  34. package/dist/utilities/dotGet.js +44 -44
  35. package/dist/utilities/dotNotate.js +52 -52
  36. package/dist/utilities/dotSet.js +38 -38
  37. package/dist/utilities/isObject.js +8 -8
  38. package/dist/utilities/strAfter.js +11 -11
  39. package/dist/utilities/strBefore.js +11 -11
  40. package/dist/watchFull.js +10 -10
  41. package/dist/watchTest.js +17 -17
  42. package/package.json +11 -3
package/dist/partials.js CHANGED
@@ -1,103 +1,103 @@
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
+ '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')
package/dist/sass.js CHANGED
@@ -1,10 +1,10 @@
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
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
@@ -1,72 +1,72 @@
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
-
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
+
37
37
  /**
38
38
  * Update the gulp configurations with the test data. Set the test directory where temp files will be created for testing.
39
39
  * @memberOf module:testHelpers
40
40
  * @param {string} testDir
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
- };
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
72
  exports.setDefaults = setDefaults;
package/dist/testFull.js CHANGED
@@ -1,27 +1,27 @@
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 }
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 }
13
13
  /**
14
14
  * Run all tests with jest.
15
15
  * Configure where tests are located by using 'testPath'.
16
16
  * @memberOf module:js-build-tools
17
17
  * @returns {Promise<*>}
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
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,11 +1,11 @@
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
+ '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 }
package/dist/testQuick.js CHANGED
@@ -1,29 +1,29 @@
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 }
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 }
13
13
  /**
14
14
  * Run the Jest tests for files which have been modified (based on git status).
15
15
  * Configure where tests are located by using 'testPath'.
16
16
  * @memberOf module:js-build-tools
17
17
  * @returns {Promise<*>}
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
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,13 +1,13 @@
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')
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')
8
8
  /**
9
9
  * Simplified typescript task using tsFor.
10
10
  * @memberOf module:js-build-tools
11
11
  * @returns {Function}
12
- */
13
- const typeScript = exports.typeScript = (0, _tsFor.tsFor)()
12
+ */
13
+ const typeScript = exports.typeScript = (0, _tsFor.tsFor)()
@@ -1,12 +1,12 @@
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");
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");
10
10
  /**
11
11
  * Get a nested property value from an object.
12
12
  * Original source concepts from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/objects/dotGet.ts Sí, funciona}
@@ -14,39 +14,39 @@ var _strBefore = require("./strBefore.js");
14
14
  * @param {string} dotNotation - The path to the property
15
15
  * @param {string|null} [defaultValue=null] - The default value to return if the property is not found
16
16
  * @returns {*} The value of the property
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
- };
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
52
  exports.dotGet = dotGet;