js-build-tools 4.0.12 → 4.1.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 +0 -120
- package/dist/build.js +1 -3
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +1 -2
- package/dist/bundle.min.js +1 -1
- package/dist/bundleLint.js +1 -2
- package/dist/bundleLint.min.js +1 -1
- package/dist/bundleMinify.js +1 -2
- package/dist/bundleMinify.min.js +1 -1
- package/dist/copyFonts.js +0 -1
- package/dist/copyFonts.min.js +1 -1
- package/dist/default.js +1 -5
- package/dist/default.min.js +1 -1
- package/dist/distLint.js +0 -1
- package/dist/distLint.min.js +1 -1
- package/dist/distMinify.js +0 -1
- package/dist/distMinify.min.js +1 -1
- package/dist/partials/addToReadme.js +0 -1
- package/dist/partials/beginWatcher.js +0 -1
- package/dist/partials/clean.js +0 -1
- package/dist/partials/distFor.js +6 -14
- package/dist/partials/distForSrc.js +1 -5
- package/dist/partials/distSeries.js +1 -5
- package/dist/partials/imagesFor.js +7 -12
- package/dist/partials/readmeTemplate.js +0 -1
- package/dist/partials/runOnChange.js +3 -7
- package/dist/partials/sassFor.js +4 -9
- package/dist/partials/tsFor.js +86 -27
- package/dist/test-helpers/setUp.js +20 -22
- package/dist/testFull.js +20 -22
- package/dist/testFull.min.js +1 -1
- package/dist/testHelpers.js +0 -1
- package/dist/testHelpers.min.js +1 -1
- package/dist/testQuick.js +22 -24
- package/dist/testQuick.min.js +1 -1
- package/dist/utilities/dotGet.js +2 -6
- package/dist/utilities/dotNotate.js +6 -15
- package/dist/utilities/dotSet.js +2 -4
- package/dist/watchTest.js +0 -1
- package/dist/watchTest.min.js +1 -1
- package/functions/build.test.mjs +24 -0
- package/functions/partials/distFor.test.mjs +41 -10
- package/functions/partials/tsFor.mjs +73 -9
- package/functions/partials/tsFor.test.mjs +31 -1
- package/functions/testFull.mjs +2 -2
- package/functions/testFull.test.mjs +2 -2
- package/functions/testQuick.mjs +2 -2
- package/functions/testQuick.test.mjs +2 -2
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -426,126 +426,6 @@ Export these functions to your own project to customize your build pipeline.
|
|
|
426
426
|
|
|
427
427
|
**Version**: 3.0.0
|
|
428
428
|
**Author**: Joshua Heagle <joshuaheagle@gmail.com>
|
|
429
|
-
|
|
430
|
-
* [js-build-tools](#module_js-build-tools)
|
|
431
|
-
* [.typeScript](#module_js-build-tools.typeScript) ⇒ <code>function</code>
|
|
432
|
-
* [.compileReadme](#module_js-build-tools.compileReadme) ⇒ <code>stream.Stream</code>
|
|
433
|
-
* [.watchTest()](#module_js-build-tools.watchTest) ⇒ <code>\*</code>
|
|
434
|
-
* [.watchFull()](#module_js-build-tools.watchFull) ⇒ <code>FSWatcher</code>
|
|
435
|
-
* [.testQuick()](#module_js-build-tools.testQuick) ⇒ <code>Promise.<\*></code>
|
|
436
|
-
* [.testFull()](#module_js-build-tools.testFull) ⇒ <code>Promise.<\*></code>
|
|
437
|
-
* [.images()](#module_js-build-tools.images) ⇒ <code>stream.Stream</code>
|
|
438
|
-
* [.distMinify()](#module_js-build-tools.distMinify) ⇒ <code>\*</code>
|
|
439
|
-
* [.distLint()](#module_js-build-tools.distLint) ⇒ <code>\*</code>
|
|
440
|
-
* [.dist()](#module_js-build-tools.dist) ⇒ <code>\*</code>
|
|
441
|
-
* [.defaultCmd([done])](#module_js-build-tools.defaultCmd) ⇒ <code>stream.Stream</code>
|
|
442
|
-
* [.copyFonts()](#module_js-build-tools.copyFonts) ⇒ <code>stream.Stream</code>
|
|
443
|
-
* [.bundleMinify()](#module_js-build-tools.bundleMinify) ⇒ <code>\*</code>
|
|
444
|
-
* [.bundleLint()](#module_js-build-tools.bundleLint) ⇒ <code>stream.Stream</code>
|
|
445
|
-
* [.bundle()](#module_js-build-tools.bundle) ⇒ <code>stream.Stream</code>
|
|
446
|
-
* [.build()](#module_js-build-tools.build) ⇒ <code>stream.Stream</code>
|
|
447
|
-
|
|
448
|
-
<a name="module_js-build-tools.typeScript"></a>
|
|
449
|
-
|
|
450
|
-
### js-build-tools.typeScript ⇒ <code>function</code>
|
|
451
|
-
Simplified typescript task using tsFor.
|
|
452
|
-
|
|
453
|
-
**Kind**: static constant of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
454
|
-
<a name="module_js-build-tools.compileReadme"></a>
|
|
455
|
-
|
|
456
|
-
### js-build-tools.compileReadme ⇒ <code>stream.Stream</code>
|
|
457
|
-
Generate the README.md file based off of the template, then append the generated documentation.
|
|
458
|
-
|
|
459
|
-
**Kind**: static constant of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
460
|
-
<a name="module_js-build-tools.watchTest"></a>
|
|
461
|
-
|
|
462
|
-
### js-build-tools.watchTest() ⇒ <code>\*</code>
|
|
463
|
-
Watch for changes and run the tests.
|
|
464
|
-
|
|
465
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
466
|
-
<a name="module_js-build-tools.watchFull"></a>
|
|
467
|
-
|
|
468
|
-
### js-build-tools.watchFull() ⇒ <code>FSWatcher</code>
|
|
469
|
-
Watch for changes and run the distribution for the changed files, then bundle and test the changed files.
|
|
470
|
-
|
|
471
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
472
|
-
<a name="module_js-build-tools.testQuick"></a>
|
|
473
|
-
|
|
474
|
-
### js-build-tools.testQuick() ⇒ <code>Promise.<\*></code>
|
|
475
|
-
Run the Jest tests for files which have been modified (based on git status).
|
|
476
|
-
|
|
477
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
478
|
-
<a name="module_js-build-tools.testFull"></a>
|
|
479
|
-
|
|
480
|
-
### js-build-tools.testFull() ⇒ <code>Promise.<\*></code>
|
|
481
|
-
Run all tests with jest.
|
|
482
|
-
|
|
483
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
484
|
-
<a name="module_js-build-tools.images"></a>
|
|
485
|
-
|
|
486
|
-
### js-build-tools.images() ⇒ <code>stream.Stream</code>
|
|
487
|
-
Move and optimize the images into the browser folder using configured settings.
|
|
488
|
-
|
|
489
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
490
|
-
<a name="module_js-build-tools.distMinify"></a>
|
|
491
|
-
|
|
492
|
-
### js-build-tools.distMinify() ⇒ <code>\*</code>
|
|
493
|
-
Creates minified versions of the dist files.
|
|
494
|
-
|
|
495
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
496
|
-
<a name="module_js-build-tools.distLint"></a>
|
|
497
|
-
|
|
498
|
-
### js-build-tools.distLint() ⇒ <code>\*</code>
|
|
499
|
-
Applies Standard code style linting to distribution files.
|
|
500
|
-
|
|
501
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
502
|
-
<a name="module_js-build-tools.dist"></a>
|
|
503
|
-
|
|
504
|
-
### js-build-tools.dist() ⇒ <code>\*</code>
|
|
505
|
-
Simplified distribution tasks which will use arguments from distFor.
|
|
506
|
-
|
|
507
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
508
|
-
<a name="module_js-build-tools.defaultCmd"></a>
|
|
509
|
-
|
|
510
|
-
### js-build-tools.defaultCmd([done]) ⇒ <code>stream.Stream</code>
|
|
511
|
-
Recommended as the default task, runs the simple dist and bundle tasks.
|
|
512
|
-
|
|
513
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
514
|
-
|
|
515
|
-
| Param | Type | Default |
|
|
516
|
-
| --- | --- | --- |
|
|
517
|
-
| [done] | <code>function</code> | <code></code> |
|
|
518
|
-
|
|
519
|
-
<a name="module_js-build-tools.copyFonts"></a>
|
|
520
|
-
|
|
521
|
-
### js-build-tools.copyFonts() ⇒ <code>stream.Stream</code>
|
|
522
|
-
Move the font files into the browser directory.
|
|
523
|
-
|
|
524
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
525
|
-
<a name="module_js-build-tools.bundleMinify"></a>
|
|
526
|
-
|
|
527
|
-
### js-build-tools.bundleMinify() ⇒ <code>\*</code>
|
|
528
|
-
Creates the minified bundle file.
|
|
529
|
-
|
|
530
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
531
|
-
<a name="module_js-build-tools.bundleLint"></a>
|
|
532
|
-
|
|
533
|
-
### js-build-tools.bundleLint() ⇒ <code>stream.Stream</code>
|
|
534
|
-
Applies Standard code style linting to bundled file.
|
|
535
|
-
|
|
536
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
537
|
-
<a name="module_js-build-tools.bundle"></a>
|
|
538
|
-
|
|
539
|
-
### js-build-tools.bundle() ⇒ <code>stream.Stream</code>
|
|
540
|
-
Starting at the distribution entry point, bundle all the files into a single file and store them in the specified output directory.
|
|
541
|
-
|
|
542
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
543
|
-
<a name="module_js-build-tools.build"></a>
|
|
544
|
-
|
|
545
|
-
### js-build-tools.build() ⇒ <code>stream.Stream</code>
|
|
546
|
-
Runs several processes to build and validate the project.
|
|
547
|
-
|
|
548
|
-
**Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
|
|
549
429
|
<a name="module_gulpConfig"></a>
|
|
550
430
|
|
|
551
431
|
## gulpConfig
|
package/dist/build.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
5
5
|
value: true
|
|
6
6
|
})
|
|
7
7
|
exports.build = void 0
|
|
8
|
-
require('core-js/modules/web.dom-collections.iterator.js')
|
|
9
8
|
var _bundle = require('./bundle.js')
|
|
10
9
|
var _bundleLint = require('./bundleLint.js')
|
|
11
10
|
var _bundleMinify = require('./bundleMinify.js')
|
|
@@ -26,8 +25,7 @@ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var
|
|
|
26
25
|
* @memberOf module:js-build-tools
|
|
27
26
|
* @returns {stream.Stream}
|
|
28
27
|
*/
|
|
29
|
-
const build =
|
|
30
|
-
const done = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null
|
|
28
|
+
const build = (done = null) => {
|
|
31
29
|
const distLintMinify = (0, _gulp.parallel)(_distLint.distLint, _distMinify.distMinify)
|
|
32
30
|
const bundleLintMinify = (0, _gulp.parallel)(_bundleLint.bundleLint, _bundleMinify.bundleMinify)
|
|
33
31
|
const buildActions = [_partials.clean, (0, _partials.distSeries)(), distLintMinify]
|
package/dist/build.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=void 0
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=void 0;var _bundle=require("./bundle.js"),_bundleLint=require("./bundleLint.js"),_bundleMinify=require("./bundleMinify.js"),_partials=require("./partials.js"),_compileReadme=require("./compileReadme.js"),_distLint=require("./distLint.js"),_distMinify=require("./distMinify.js"),_gulp=require("gulp"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_copyFonts=require("./copyFonts.js"),_images=require("./images.js"),_sass=require("./sass.js"),_testFull=require("./testFull.js");function _interopRequireWildcard(e,i){if("function"==typeof WeakMap)var s=new WeakMap,t=new WeakMap;return(_interopRequireWildcard=function(e,i){if(!i&&e&&e.__esModule)return e;var l,r,n={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return n;if(l=i?t:s){if(l.has(e))return l.get(e);l.set(e,n)}for(const i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?l(n,i,r):n[i]=e[i]);return n})(e,i)}const build=(e=null)=>{const i=(0,_gulp.parallel)(_distLint.distLint,_distMinify.distMinify),s=(0,_gulp.parallel)(_bundleLint.bundleLint,_bundleMinify.bundleMinify),t=[_partials.clean,(0,_partials.distSeries)(),i];gulpConfig.get("typescript.enabled")&&t.push(_compileReadme.compileReadme),gulpConfig.get("browser.enabled")&&(t.push(_bundle.bundle),t.push(s));const l=[(0,_gulp.series)(...t)];return gulpConfig.get("typescript.enabled")||l.push(_compileReadme.compileReadme),l.push(_testFull.testFull),gulpConfig.get("fonts.enabled")&&l.push(_copyFonts.copyFonts),gulpConfig.get("images.enabled")&&l.push(_images.images),gulpConfig.get("sass.enabled")&&l.push(_sass.sass),(0,_gulp.parallel)(...l)(e)};exports.build=build;
|
package/dist/bundle.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js')
|
|
5
4
|
Object.defineProperty(exports, '__esModule', {
|
|
6
5
|
value: true
|
|
7
6
|
})
|
|
@@ -17,5 +16,5 @@ function _interopRequireDefault (e) { return e && e.__esModule ? e : { default:
|
|
|
17
16
|
* @memberOf module:js-build-tools
|
|
18
17
|
* @returns {stream.Stream}
|
|
19
18
|
*/
|
|
20
|
-
const bundle = () => (0, _browserify.default)(gulpConfig.get('dist.main')).bundle().pipe((0, _vinylSourceStream.default)(
|
|
19
|
+
const bundle = () => (0, _browserify.default)(gulpConfig.get('dist.main')).bundle().pipe((0, _vinylSourceStream.default)(`${gulpConfig.get('browser.name')}.js`)).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
|
|
21
20
|
exports.bundle = bundle
|
package/dist/bundle.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.bundle=void 0;var _browserify=_interopRequireDefault(require("browserify")),_gulp=require("gulp"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_vinylSourceStream=_interopRequireDefault(require("vinyl-source-stream"));function _interopRequireWildcard(e,r){if("function"==typeof WeakMap)var t=new WeakMap,u=new WeakMap;return(_interopRequireWildcard=function(e,r){if(!r&&e&&e.__esModule)return e;var i,n,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=r?u:t){if(i.has(e))return i.get(e);i.set(e,o)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((n=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(n.get||n.set)?i(o,r,n):o[r]=e[r]);return o})(e,r)}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const bundle=()=>(0,_browserify.default)(gulpConfig.get("dist.main")).bundle().pipe((0,_vinylSourceStream.default)(`${gulpConfig.get("browser.name")}.js`)).pipe((0,_gulp.dest)(gulpConfig.get("browser.to")));exports.bundle=bundle;
|
package/dist/bundleLint.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js')
|
|
5
4
|
Object.defineProperty(exports, '__esModule', {
|
|
6
5
|
value: true
|
|
7
6
|
})
|
|
@@ -16,7 +15,7 @@ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var
|
|
|
16
15
|
* @memberOf module:js-build-tools
|
|
17
16
|
* @returns {stream.Stream}
|
|
18
17
|
*/
|
|
19
|
-
const bundleLint = () => (0, _gulp.src)(
|
|
18
|
+
const bundleLint = () => (0, _gulp.src)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`).pipe((0, _gulpStandard.default)({
|
|
20
19
|
fix: true
|
|
21
20
|
})).pipe(_gulpStandard.default.reporter('default', {
|
|
22
21
|
fix: true,
|
package/dist/bundleLint.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.bundleLint=void 0;var _gulp=require("gulp"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_gulpStandard=_interopRequireDefault(require("gulp-standard"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,r){if("function"==typeof WeakMap)var t=new WeakMap,u=new WeakMap;return(_interopRequireWildcard=function(e,r){if(!r&&e&&e.__esModule)return e;var n,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(n=r?u:t){if(n.has(e))return n.get(e);n.set(e,o)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((i=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(i.get||i.set)?n(o,r,i):o[r]=e[r]);return o})(e,r)}const bundleLint=()=>(0,_gulp.src)(`${gulpConfig.get("browser.to")}/${gulpConfig.get("browser.name")}.js`).pipe((0,_gulpStandard.default)({fix:!0})).pipe(_gulpStandard.default.reporter("default",{fix:!0,quiet:!0})).pipe((0,_gulp.dest)(gulpConfig.get("browser.to")));exports.bundleLint=bundleLint;
|
package/dist/bundleMinify.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js')
|
|
5
4
|
Object.defineProperty(exports, '__esModule', {
|
|
6
5
|
value: true
|
|
7
6
|
})
|
|
@@ -14,5 +13,5 @@ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var
|
|
|
14
13
|
* @memberOf module:js-build-tools
|
|
15
14
|
* @returns {*}
|
|
16
15
|
*/
|
|
17
|
-
const bundleMinify = () => (0, _minifyFor.minifyFor)(
|
|
16
|
+
const bundleMinify = () => (0, _minifyFor.minifyFor)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`, gulpConfig.get('browser.to'))
|
|
18
17
|
exports.bundleMinify = bundleMinify
|
package/dist/bundleMinify.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.bundleMinify=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_minifyFor=require("./partials/minifyFor.js");function _interopRequireWildcard(e,r){if("function"==typeof WeakMap)var i=new WeakMap,t=new WeakMap;return(_interopRequireWildcard=function(e,r){if(!r&&e&&e.__esModule)return e;var n,o,u={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return u;if(n=r?t:i){if(n.has(e))return n.get(e);n.set(e,u)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(o.get||o.set)?n(u,r,o):u[r]=e[r]);return u})(e,r)}const bundleMinify=()=>(0,_minifyFor.minifyFor)(`${gulpConfig.get("browser.to")}/${gulpConfig.get("browser.name")}.js`,gulpConfig.get("browser.to"));exports.bundleMinify=bundleMinify;
|
package/dist/copyFonts.js
CHANGED
package/dist/copyFonts.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.copyFonts=void 0;var _copyFor=require("./partials/copyFor.js"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js"));function _interopRequireWildcard(e,o){if("function"==typeof WeakMap)var r=new WeakMap,t=new WeakMap;return(_interopRequireWildcard=function(e,o){if(!o&&e&&e.__esModule)return e;var n,i,p={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return p;if(n=o?t:r){if(n.has(e))return n.get(e);n.set(e,p)}for(const o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&((i=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,o))&&(i.get||i.set)?n(p,o,i):p[o]=e[o]);return p})(e,o)}const copyFonts=()=>(0,_copyFor.copyFor)(gulpConfig.get("fonts.from"),gulpConfig.get("fonts.to"));exports.copyFonts=copyFonts;
|
package/dist/default.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js')
|
|
5
4
|
Object.defineProperty(exports, '__esModule', {
|
|
6
5
|
value: true
|
|
7
6
|
})
|
|
@@ -17,8 +16,5 @@ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var
|
|
|
17
16
|
* @param {function} [done=null]
|
|
18
17
|
* @returns {stream.Stream}
|
|
19
18
|
*/
|
|
20
|
-
const defaultCmd =
|
|
21
|
-
const done = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null
|
|
22
|
-
return gulpConfig.get('browser.enabled') ? (0, _gulp.series)(_dist.dist, _bundle.bundle)(done) : (0, _gulp.series)(_dist.dist)(done)
|
|
23
|
-
}
|
|
19
|
+
const defaultCmd = (done = null) => gulpConfig.get('browser.enabled') ? (0, _gulp.series)(_dist.dist, _bundle.bundle)(done) : (0, _gulp.series)(_dist.dist)(done)
|
|
24
20
|
exports.defaultCmd = defaultCmd
|
package/dist/default.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultCmd=void 0;var _dist=require("./dist.js"),_bundle=require("./bundle.js"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_gulp=require("gulp");function _interopRequireWildcard(e,r){if("function"==typeof WeakMap)var t=new WeakMap,u=new WeakMap;return(_interopRequireWildcard=function(e,r){if(!r&&e&&e.__esModule)return e;var i,n,l={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return l;if(i=r?u:t){if(i.has(e))return i.get(e);i.set(e,l)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((n=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(n.get||n.set)?i(l,r,n):l[r]=e[r]);return l})(e,r)}const defaultCmd=(e=null)=>gulpConfig.get("browser.enabled")?(0,_gulp.series)(_dist.dist,_bundle.bundle)(e):(0,_gulp.series)(_dist.dist)(e);exports.defaultCmd=defaultCmd;
|
package/dist/distLint.js
CHANGED
package/dist/distLint.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.distLint=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_gulp=require("gulp"),_gulpStandard=_interopRequireDefault(require("gulp-standard"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var u,n,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(u=t?i:r){if(u.has(e))return u.get(e);u.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((n=(u=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(n.get||n.set)?u(o,t,n):o[t]=e[t]);return o})(e,t)}const distLint=()=>(0,_gulp.src)(gulpConfig.get("browser.from")).pipe((0,_gulpStandard.default)({fix:!0})).pipe(_gulpStandard.default.reporter("default",{fix:!0,quiet:!0})).pipe((0,_gulp.dest)(gulpConfig.get("dist.to")));exports.distLint=distLint;
|
package/dist/distMinify.js
CHANGED
package/dist/distMinify.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.distMinify=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_minifyFor=require("./partials/minifyFor.js");function _interopRequireWildcard(e,i){if("function"==typeof WeakMap)var r=new WeakMap,t=new WeakMap;return(_interopRequireWildcard=function(e,i){if(!i&&e&&e.__esModule)return e;var n,o,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(n=i?t:r){if(n.has(e))return n.get(e);n.set(e,f)}for(const i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(o.get||o.set)?n(f,i,o):f[i]=e[i]);return f})(e,i)}const distMinify=()=>(0,_minifyFor.minifyFor)(gulpConfig.get("browser.from"),gulpConfig.get("dist.to"));exports.distMinify=distMinify;
|
package/dist/partials/clean.js
CHANGED
package/dist/partials/distFor.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.distFor = void 0;
|
|
9
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
10
|
-
require("core-js/modules/es.string.replace.js");
|
|
11
|
-
require("core-js/modules/esnext.string.replace-all.js");
|
|
12
8
|
var _gulpBabel = _interopRequireDefault(require("gulp-babel"));
|
|
13
9
|
var _gulp = require("gulp");
|
|
14
10
|
var _distForSrc = require("./distForSrc.js");
|
|
@@ -23,14 +19,10 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
23
19
|
* @param {string} [destPath='dist/config/path']
|
|
24
20
|
* @returns {stream.Stream}
|
|
25
21
|
*/
|
|
26
|
-
const distFor = function () {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
this.push(file);
|
|
33
|
-
callback();
|
|
34
|
-
})).pipe((0, _gulp.dest)(destPath));
|
|
35
|
-
};
|
|
22
|
+
const distFor = (srcPath = (0, _distForSrc.distForSrc)(), destPath = gulpConfig.get('dist.to')) => (0, _gulp.src)(srcPath).pipe((0, _gulpBabel.default)()).pipe(_through.default.obj(function (file, enc, callback) {
|
|
23
|
+
const regex = /\.mjs(['"]\s*\))/gi;
|
|
24
|
+
file.contents = Buffer.from(file.contents.toString().replaceAll(regex, '.js$1'));
|
|
25
|
+
this.push(file);
|
|
26
|
+
callback();
|
|
27
|
+
})).pipe((0, _gulp.dest)(destPath));
|
|
36
28
|
exports.distFor = distFor;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -14,8 +13,5 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
14
13
|
* @param {module:gulpConfig~FlagStringSetting} [useTs='config/for/ts']
|
|
15
14
|
* @returns {string}
|
|
16
15
|
*/
|
|
17
|
-
const distForSrc =
|
|
18
|
-
let useTs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : gulpConfig.get('typescript.enabled');
|
|
19
|
-
return useTs ? gulpConfig.get('browser.from') : gulpConfig.get('dist.from');
|
|
20
|
-
};
|
|
16
|
+
const distForSrc = (useTs = gulpConfig.get('typescript.enabled')) => useTs ? gulpConfig.get('browser.from') : gulpConfig.get('dist.from');
|
|
21
17
|
exports.distForSrc = distForSrc;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -20,10 +19,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
20
19
|
* @param {string} [tsSearch='ts/search/config/path']
|
|
21
20
|
* @returns {function(null=): stream.Stream}
|
|
22
21
|
*/
|
|
23
|
-
const distSeries =
|
|
24
|
-
let srcPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _distForSrc.distForSrc)();
|
|
25
|
-
let distFinalPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : gulpConfig.get('dist.to');
|
|
26
|
-
let tsSearch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : gulpConfig.get('typescript.from');
|
|
22
|
+
const distSeries = (srcPath = (0, _distForSrc.distForSrc)(), distFinalPath = gulpConfig.get('dist.to'), tsSearch = gulpConfig.get('typescript.from')) => {
|
|
27
23
|
const typescript = (0, _tsFor.tsFor)(tsSearch, distFinalPath);
|
|
28
24
|
const dist = () => (0, _distFor.distFor)(srcPath, distFinalPath);
|
|
29
25
|
return gulpConfig.get('typescript.enabled') ? (0, _gulp.series)(typescript, dist) : dist;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -19,15 +18,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
19
18
|
* @param {string} [imageDest=dest/image/folder]
|
|
20
19
|
* @return {stream.Stream}
|
|
21
20
|
*/
|
|
22
|
-
const imagesFor =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
silent: true,
|
|
30
|
-
verbose: false
|
|
31
|
-
}))).pipe((0, _gulp.dest)(imageDest));
|
|
32
|
-
};
|
|
21
|
+
const imagesFor = (imageSrc = gulpConfig.get('images.from'), imageDest = gulpConfig.get('images.to')) => (0, _gulp.src)(imageSrc).pipe(
|
|
22
|
+
// Caching images that ran through imagemin
|
|
23
|
+
(0, _gulpCache.default)((0, _gulpImagemin.default)({
|
|
24
|
+
interlaced: true,
|
|
25
|
+
silent: true,
|
|
26
|
+
verbose: false
|
|
27
|
+
}))).pipe((0, _gulp.dest)(imageDest));
|
|
33
28
|
exports.imagesFor = imagesFor;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.runOnChange = void 0;
|
|
9
|
-
require("core-js/modules/es.regexp.constructor.js");
|
|
10
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
11
|
-
require("core-js/modules/es.string.replace.js");
|
|
12
8
|
var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
|
|
13
9
|
var _bundle = require("../bundle.js");
|
|
14
10
|
var _distSeries = require("./distSeries.js");
|
|
@@ -52,11 +48,11 @@ const runOnChange = path => {
|
|
|
52
48
|
* 5. Use the dist path found previously in #2
|
|
53
49
|
* 6. Use the full dist path and the dist outgoing path in distFor
|
|
54
50
|
*/
|
|
55
|
-
const pathRegex = new RegExp(
|
|
56
|
-
const distPathResult = path.replace(pathRegex,
|
|
51
|
+
const pathRegex = new RegExp(`^${srcPath}(.*\\/)(.+)\\.(js|ts)$`, 'i');
|
|
52
|
+
const distPathResult = path.replace(pathRegex, `${distPath}$1`);
|
|
57
53
|
let distSrcPath = path;
|
|
58
54
|
if (useTs) {
|
|
59
|
-
distSrcPath = path.replace(pathRegex,
|
|
55
|
+
distSrcPath = path.replace(pathRegex, `${distPath}$1$2.js`);
|
|
60
56
|
}
|
|
61
57
|
const runSeries = (0, _distSeries.distSeries)(distSrcPath, distPathResult, path);
|
|
62
58
|
return gulpConfig.get('browser.enabled') ? (0, _gulp.parallel)(_testQuick.testQuick, (0, _gulp.series)(runSeries, _bundle.bundle))() : (0, _gulp.series)(_testQuick.testQuick, runSeries)();
|
package/dist/partials/sassFor.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -23,12 +22,8 @@ const runSass = (0, _gulpSass.default)(sass);
|
|
|
23
22
|
* @param {string} [cssPath='css/config/path']
|
|
24
23
|
* @returns {stream.Stream}
|
|
25
24
|
*/
|
|
26
|
-
const sassFor =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.pipe((0, _gulp.dest)(cssPath)).pipe((0, _gulpCssnano.default)()).pipe((0, _gulpRename.default)({
|
|
31
|
-
extname: '.min.css'
|
|
32
|
-
})).pipe((0, _gulp.dest)(cssPath));
|
|
33
|
-
};
|
|
25
|
+
const sassFor = (srcSearch = gulpConfig.get('sass.from'), cssPath = gulpConfig.get('sass.to')) => (0, _gulp.src)(srcSearch).pipe(runSass().on('error', runSass.logError)) // Passes it through a gulp-sass, log errors to console
|
|
26
|
+
.pipe((0, _gulp.dest)(cssPath)).pipe((0, _gulpCssnano.default)()).pipe((0, _gulpRename.default)({
|
|
27
|
+
extname: '.min.css'
|
|
28
|
+
})).pipe((0, _gulp.dest)(cssPath));
|
|
34
29
|
exports.sassFor = sassFor;
|