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.
- package/README.md +166 -426
- package/babel.config.js +1 -1
- package/dist/build.js +33 -34
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +14 -9
- package/dist/bundle.min.js +1 -1
- package/dist/bundleLint.js +15 -11
- package/dist/bundleLint.min.js +1 -1
- package/dist/bundleMinify.js +11 -5
- package/dist/bundleMinify.min.js +1 -1
- package/dist/compileReadme.js +7 -10
- package/dist/compileReadme.min.js +1 -1
- package/dist/copyFonts.js +11 -5
- package/dist/copyFonts.min.js +1 -1
- package/dist/default.js +13 -9
- package/dist/default.min.js +1 -1
- package/dist/dist.js +7 -4
- package/dist/dist.min.js +1 -1
- package/dist/distLint.js +15 -11
- package/dist/distLint.min.js +1 -1
- package/dist/distMinify.js +11 -5
- package/dist/distMinify.min.js +1 -1
- package/dist/images.js +7 -4
- package/dist/images.min.js +1 -1
- package/dist/partials/addToReadme.js +16 -11
- package/dist/partials/beginWatcher.js +11 -7
- package/dist/partials/clean.js +11 -5
- package/dist/partials/copyFor.js +7 -7
- package/dist/partials/distFor.js +21 -11
- package/dist/partials/distForSrc.js +9 -3
- package/dist/partials/distSeries.js +17 -13
- package/dist/partials/imagesFor.js +16 -17
- package/dist/partials/minifyFor.js +12 -11
- package/dist/partials/readmeTemplate.js +13 -9
- package/dist/partials/removeDirectory.js +7 -7
- package/dist/partials/runOnChange.js +18 -16
- package/dist/partials/sassFor.js +19 -12
- package/dist/partials/tsFor.js +17 -14
- package/dist/partials.js +101 -39
- package/dist/partials.min.js +1 -1
- package/dist/sass.js +7 -4
- package/dist/sass.min.js +1 -1
- package/dist/test-helpers/setUp.js +50 -47
- package/dist/testFull.js +12 -7
- package/dist/testFull.min.js +1 -1
- package/dist/testHelpers.js +9 -13
- package/dist/testHelpers.min.js +1 -1
- package/dist/testQuick.js +12 -7
- package/dist/testQuick.min.js +1 -1
- package/dist/typeScript.js +6 -4
- package/dist/typeScript.min.js +1 -1
- package/dist/utilities/dotGet.js +14 -12
- package/dist/utilities/dotNotate.js +10 -8
- package/dist/utilities/dotSet.js +13 -11
- package/dist/utilities/isObject.js +5 -1
- package/dist/utilities/strAfter.js +11 -7
- package/dist/utilities/strBefore.js +11 -7
- package/dist/watchFull.js +7 -7
- package/dist/watchFull.min.js +1 -1
- package/dist/watchTest.js +13 -9
- package/dist/watchTest.min.js +1 -1
- package/functions/{build.js → build.mjs} +14 -16
- package/functions/{build.test.js → build.test.mjs} +9 -8
- package/functions/{bundle.js → bundle.mjs} +5 -7
- package/functions/{bundle.test.js → bundle.test.mjs} +5 -4
- package/functions/{bundleLint.js → bundleLint.mjs} +4 -6
- package/functions/{bundleLint.test.js → bundleLint.test.mjs} +5 -4
- package/functions/bundleMinify.mjs +9 -0
- package/functions/bundleMinify.test.mjs +15 -0
- package/functions/compileReadme.mjs +9 -0
- package/functions/{compileReadme.test.js → compileReadme.test.mjs} +4 -4
- package/functions/copyFonts.mjs +9 -0
- package/functions/{copyFonts.test.js → copyFonts.test.mjs} +4 -3
- package/functions/default.mjs +12 -0
- package/functions/{default.test.js → default.test.mjs} +8 -7
- package/functions/{dist.js → dist.mjs} +2 -4
- package/functions/{dist.test.js → dist.test.mjs} +4 -3
- package/functions/{distLint.js → distLint.mjs} +4 -6
- package/functions/{distLint.test.js → distLint.test.mjs} +5 -4
- package/functions/distMinify.mjs +9 -0
- package/functions/distMinify.test.mjs +15 -0
- package/functions/{images.js → images.mjs} +2 -4
- package/functions/{images.test.js → images.test.mjs} +4 -3
- package/functions/partials/{addToReadme.js → addToReadme.mjs} +5 -7
- package/functions/partials/{addToReadme.test.js → addToReadme.test.mjs} +4 -3
- package/functions/partials/beginWatcher.mjs +9 -0
- package/functions/partials/{beginWatcher.test.js → beginWatcher.test.mjs} +4 -3
- package/functions/partials/clean.mjs +13 -0
- package/functions/partials/{clean.test.js → clean.test.mjs} +4 -3
- package/functions/partials/{copyFor.js → copyFor.mjs} +2 -4
- package/functions/partials/{copyFor.test.js → copyFor.test.mjs} +4 -3
- package/functions/partials/distFor.mjs +22 -0
- package/functions/partials/{distFor.test.js → distFor.test.mjs} +49 -8
- package/functions/partials/{distForSrc.js → distForSrc.mjs} +2 -4
- package/functions/partials/{distForSrc.test.js → distForSrc.test.mjs} +3 -2
- package/functions/partials/{distSeries.js → distSeries.mjs} +6 -8
- package/functions/partials/{distSeries.test.js → distSeries.test.mjs} +7 -6
- package/functions/partials/{imagesFor.js → imagesFor.mjs} +5 -13
- package/functions/partials/{imagesFor.test.js → imagesFor.test.mjs} +4 -3
- package/functions/partials/minifyFor.mjs +15 -0
- package/functions/partials/{minifyFor.test.js → minifyFor.test.mjs} +5 -4
- package/functions/partials/readmeTemplate.mjs +12 -0
- package/functions/partials/{readmeTemplate.test.js → readmeTemplate.test.mjs} +4 -3
- package/functions/partials/{removeDirectory.js → removeDirectory.mjs} +2 -4
- package/functions/partials/{removeDirectory.test.js → removeDirectory.test.mjs} +28 -28
- package/functions/partials/{runOnChange.js → runOnChange.mjs} +6 -8
- package/functions/partials/{runOnChange.test.js → runOnChange.test.mjs} +12 -11
- package/functions/partials/sassFor.mjs +22 -0
- package/functions/partials/{sassFor.test.js → sassFor.test.mjs} +5 -4
- package/functions/partials/{tsFor.js → tsFor.mjs} +4 -6
- package/functions/partials/{tsFor.test.js → tsFor.test.mjs} +5 -4
- package/functions/partials.mjs +23 -0
- package/functions/{partials.test.js → partials.test.mjs} +1 -1
- package/functions/sass.mjs +4 -0
- package/functions/{sass.test.js → sass.test.mjs} +4 -3
- package/functions/test-helpers/{setUp.js → setUp.mjs} +25 -27
- package/functions/test-helpers/setUp.test.mjs +19 -0
- package/functions/{testFull.js → testFull.mjs} +4 -6
- package/functions/testFull.test.mjs +17 -0
- package/functions/{testHelpers.js → testHelpers.mjs} +1 -6
- package/functions/testHelpers.test.mjs +7 -0
- package/functions/{testQuick.js → testQuick.mjs} +4 -6
- package/functions/testQuick.test.mjs +17 -0
- package/functions/{typeScript.js → typeScript.mjs} +2 -4
- package/functions/typeScript.test.mjs +11 -0
- package/functions/utilities/{dotGet.js → dotGet.mjs} +4 -6
- package/functions/utilities/{dotNotate.js → dotNotate.mjs} +2 -4
- package/functions/utilities/{dotSet.js → dotSet.mjs} +4 -6
- package/functions/utilities/{isObject.js → isObject.mjs} +1 -3
- package/functions/utilities/{strAfter.js → strAfter.mjs} +11 -13
- package/functions/utilities/{strBefore.js → strBefore.mjs} +11 -13
- package/functions/{watchFull.js → watchFull.mjs} +2 -4
- package/functions/{watchFull.test.js → watchFull.test.mjs} +8 -7
- package/functions/watchTest.mjs +10 -0
- package/functions/{watchTest.test.js → watchTest.test.mjs} +7 -6
- package/gulp.config.js +20 -19
- package/gulp.config.mjs +252 -0
- package/gulpfile.base.js +20 -20
- package/gulpfile.base.mjs +27 -0
- package/package.json +27 -13
- package/functions/bundleMinify.js +0 -11
- package/functions/bundleMinify.test.js +0 -14
- package/functions/compileReadme.js +0 -11
- package/functions/copyFonts.js +0 -11
- package/functions/default.js +0 -14
- package/functions/distMinify.js +0 -11
- package/functions/distMinify.test.js +0 -14
- package/functions/partials/beginWatcher.js +0 -11
- package/functions/partials/clean.js +0 -15
- package/functions/partials/distFor.js +0 -17
- package/functions/partials/minifyFor.js +0 -15
- package/functions/partials/readmeTemplate.js +0 -14
- package/functions/partials/sassFor.js +0 -21
- package/functions/partials.js +0 -40
- package/functions/sass.js +0 -6
- package/functions/test-helpers/setUp.test.js +0 -18
- package/functions/testFull.test.js +0 -16
- package/functions/testHelpers.test.js +0 -7
- package/functions/testQuick.test.js +0 -16
- package/functions/typeScript.test.js +0 -10
- package/functions/watchTest.js +0 -12
- package/vendor/array-union/index.js +0 -31
- package/vendor/easy-transform-stream/index.js +0 -54
- package/vendor/globby/gitignore.js +0 -96
- package/vendor/globby/index.js +0 -191
- package/vendor/globby/node_modules/slash/index.js +0 -16
- package/vendor/globby/stream-utils.js +0 -58
- package/vendor/globby/to-path.js +0 -20
- package/vendor/gulp-imagemin/index.js +0 -124
- package/vendor/gulp-imagemin/node_modules/chalk/source/index.js +0 -265
- package/vendor/gulp-imagemin/node_modules/chalk/source/utilities.js +0 -36
- package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
- package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
- package/vendor/gulp-plugin-extras/index.js +0 -42
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/index.js +0 -265
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/utilities.js +0 -36
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
- package/vendor/gulp-plugin-extras/plugin-error.js +0 -145
- package/vendor/ignore/index.js +0 -468
- package/vendor/imagemin/index.js +0 -90
- package/vendor/imagemin-gifsicle/index.js +0 -33
- package/vendor/imagemin-mozjpeg/index.js +0 -100
- package/vendor/imagemin-mozjpeg/node_modules/execa/index.js +0 -260
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/command.js +0 -47
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/error.js +0 -102
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/kill.js +0 -123
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/promise.js +0 -47
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stdio.js +0 -50
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stream.js +0 -124
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/core.js +0 -238
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/main.js +0 -89
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/realtime.js +0 -24
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/signals.js +0 -44
- package/vendor/imagemin-mozjpeg/node_modules/is-stream/index.js +0 -25
- package/vendor/imagemin-mozjpeg/node_modules/mimic-fn/index.js +0 -70
- package/vendor/imagemin-mozjpeg/node_modules/npm-run-path/index.js +0 -52
- package/vendor/imagemin-mozjpeg/node_modules/onetime/index.js +0 -43
- package/vendor/imagemin-mozjpeg/node_modules/path-key/index.js +0 -20
- package/vendor/imagemin-mozjpeg/node_modules/strip-final-newline/index.js +0 -17
- package/vendor/imagemin-optipng/index.js +0 -44
- package/vendor/imagemin-svgo/index.js +0 -27
- package/vendor/is-jpg/index.js +0 -12
- package/vendor/junk/index.js +0 -49
- package/vendor/mozjpeg/index.js +0 -9
- package/vendor/mozjpeg/lib/index.js +0 -18
- package/vendor/mozjpeg/package.json +0 -49
- package/vendor/mozjpeg/vendor/cjpeg +0 -0
- package/vendor/mozjpeg/vendor/source/mozjpeg.tar.gz +0 -0
- package/vendor/p-pipe/index.js +0 -22
- package/vendor/plur/index.js +0 -32
- package/vendor/pretty-bytes/index.js +0 -71
- 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
|
-
|
|
5
|
-
const {
|
|
6
|
-
setUp
|
|
7
|
-
} = require('test-filesystem');
|
|
33
|
+
|
|
8
34
|
let tempDir = 'test-temp/';
|
|
9
|
-
let srcPath =
|
|
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 =
|
|
19
|
-
srcPath =
|
|
44
|
+
tempDir = `${testDir}/`;
|
|
45
|
+
srcPath = `${tempDir}src`;
|
|
20
46
|
setUp.setDefaults(tempDir);
|
|
21
|
-
const distPath =
|
|
22
|
-
const browserPath =
|
|
23
|
-
const sassPath =
|
|
24
|
-
gulpConfig.set('browser.from',
|
|
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',
|
|
28
|
-
gulpConfig.set('dist.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',
|
|
31
|
-
gulpConfig.set('fonts.to',
|
|
32
|
-
gulpConfig.set('images.from',
|
|
33
|
-
gulpConfig.set('images.to',
|
|
34
|
-
gulpConfig.set('readme.template',
|
|
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',
|
|
62
|
+
gulpConfig.set('readme.from', `${srcPath}/**/!(*.test).js`);
|
|
37
63
|
gulpConfig.set('rootPath', tempDir);
|
|
38
|
-
gulpConfig.set('sass.from',
|
|
64
|
+
gulpConfig.set('sass.from', `${sassPath}/**/*.+(scss|sass)`);
|
|
39
65
|
gulpConfig.set('sass.path', sassPath);
|
|
40
|
-
gulpConfig.set('sass.to',
|
|
66
|
+
gulpConfig.set('sass.to', `${browserPath}/css`);
|
|
41
67
|
gulpConfig.set('srcPath', srcPath);
|
|
42
|
-
gulpConfig.set('typescript.from',
|
|
68
|
+
gulpConfig.set('typescript.from', `${srcPath}/**/*.ts`);
|
|
43
69
|
gulpConfig.set('typescript.to', distPath);
|
|
44
|
-
gulpConfig.set('test.watch',
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
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
|
-
|
|
27
|
+
exports.testFull = testFull
|
package/dist/testFull.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|
package/dist/testHelpers.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 }
|
package/dist/testHelpers.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
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
|
-
|
|
29
|
+
exports.testQuick = testQuick
|
package/dist/testQuick.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|
package/dist/typeScript.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
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)()
|
package/dist/typeScript.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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)();
|
package/dist/utilities/dotGet.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
+
exports.dotGet = dotGet;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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(
|
|
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 =
|
|
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,
|
|
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
|
-
|
|
79
|
+
exports.dotNotate = dotNotate;
|
package/dist/utilities/dotSet.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
14
|
+
exports.isObject = isObject;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
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
|
-
|
|
18
|
+
exports.strAfter = strAfter;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
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
|
-
|
|
18
|
+
exports.strBefore = strBefore;
|
package/dist/watchFull.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
13
|
+
const watchFull = () => (0, _partials.beginWatcher)().on('change', _partials.runOnChange)
|
|
14
|
+
exports.watchFull = watchFull
|
package/dist/watchFull.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
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
|
-
|
|
20
|
+
}, _testQuick.testQuick)
|
|
21
|
+
exports.watchTest = watchTest
|
package/dist/watchTest.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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' +
|