balm-core 5.0.1 → 5.0.2
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/lib/balm.js +2 -2
- package/lib/bundler/webpack/config/env.js +1 -1
- package/lib/plugins/imagemin.js +2 -2
- package/lib/plugins/replace.js +1 -1
- package/lib/tasks/foundation/balm.js +2 -1
- package/lib/tasks/foundation/balm_style.js +1 -0
- package/lib/tasks/private/build.js +1 -1
- package/lib/tasks/private/cache.js +6 -1
- package/lib/tasks/private/clean.js +3 -3
- package/lib/tasks/private/end.js +1 -1
- package/lib/tasks/private/extra.js +1 -1
- package/lib/tasks/private/font.js +1 -1
- package/lib/tasks/private/image.js +2 -1
- package/lib/tasks/private/lint.js +1 -1
- package/lib/tasks/private/media.js +1 -1
- package/lib/tasks/private/modernizr.js +3 -3
- package/lib/tasks/private/pwa-cache.js +1 -1
- package/lib/tasks/private/sprite.js +5 -3
- package/lib/tasks/private/start.js +1 -1
- package/lib/tasks/private/workbox-sw.js +1 -1
- package/lib/tasks/public/html.js +2 -2
- package/lib/tasks/public/publish.js +2 -2
- package/lib/tasks/public/remove.js +2 -2
- package/lib/tasks/public/server.js +2 -2
- package/lib/tasks/public/url.js +2 -2
- package/lib/utilities/compiling.js +2 -2
- package/lib/utilities/loading.js +2 -2
- package/lib/utilities/logger.js +2 -2
- package/package.json +27 -26
- package/tslib/plugins/imagemin.js +2 -2
- package/tslib/tasks/foundation/balm.js +1 -0
- package/tslib/tasks/foundation/balm_style.js +1 -0
- package/tslib/tasks/private/cache.js +3 -0
- package/tslib/tasks/private/image.js +1 -0
- package/tslib/tasks/private/sprite.js +1 -1
package/lib/balm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4
4
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
5
5
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
2
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
-
function _defineProperty(
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import dotenv from 'dotenv';
|
package/lib/plugins/imagemin.js
CHANGED
|
@@ -39,9 +39,9 @@ function gulpImagemin(customPlugins) {
|
|
|
39
39
|
const plugins = customPlugins ?? getDefaultPlugins();
|
|
40
40
|
(async () => {
|
|
41
41
|
try {
|
|
42
|
-
const data = await imagemin.buffer(file.contents, {
|
|
42
|
+
const data = Buffer.from(await imagemin.buffer(file.contents, {
|
|
43
43
|
plugins
|
|
44
|
-
});
|
|
44
|
+
}));
|
|
45
45
|
const originalSize = file.contents.length;
|
|
46
46
|
const optimizedSize = data.length;
|
|
47
47
|
const saved = originalSize - optimizedSize;
|
package/lib/plugins/replace.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
2
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
-
function _defineProperty(
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
// Reference `gulp-replace@1.1.4`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
class BalmTask {
|
|
@@ -31,6 +31,7 @@ class BalmTask {
|
|
|
31
31
|
}
|
|
32
32
|
get src() {
|
|
33
33
|
return gulp.src(this.input, Object.assign({
|
|
34
|
+
encoding: false,
|
|
34
35
|
allowEmpty: true
|
|
35
36
|
}, this.gulpSrcOptions)).pipe(BalmJS.plugins.plumber(error => {
|
|
36
37
|
BalmJS.logger.error(`${this.name} task`, error.message);
|
|
@@ -32,6 +32,7 @@ class BalmStyleTask extends BalmTask {
|
|
|
32
32
|
const taskName = `${this.name} task`;
|
|
33
33
|
const shouldUseSourceMap = !(BalmJS.config.env.isProd || BalmJS.config.styles.minify);
|
|
34
34
|
let stream = gulp.src(this.input, Object.assign({
|
|
35
|
+
encoding: false,
|
|
35
36
|
sourcemaps: shouldUseSourceMap,
|
|
36
37
|
allowEmpty: true
|
|
37
38
|
}, this.gulpSrcOptions)).pipe(BalmJS.plugins.plumber(function (error) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
import gulpSize from 'gulp-size';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
import revAll from 'gulp-rev-all';
|
|
@@ -18,6 +18,11 @@ class CacheTask extends BalmJS.BalmTask {
|
|
|
18
18
|
});
|
|
19
19
|
this.defaultInput = [...defaultIncludes, ...defaultExcludes, ...(BalmJS.config.inFrontend ? [node.path.join(BalmJS.config.dest.base, '*.html')] : []), ...customIncludes, ...customExcludes];
|
|
20
20
|
this.defaultOutput = BalmJS.config.inFrontend ? BalmJS.config.dest.base : BalmJS.config.dest.static;
|
|
21
|
+
|
|
22
|
+
// fix for gulp@5
|
|
23
|
+
this.gulpSrcOptions = {
|
|
24
|
+
base: BalmJS.config.dest.base
|
|
25
|
+
};
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
export default CacheTask;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
function _classPrivateFieldInitSpec(
|
|
5
|
-
function _checkPrivateRedeclaration(
|
|
4
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
5
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
6
6
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
7
7
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
8
8
|
import { deleteAsync } from 'del';
|
package/lib/tasks/private/end.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
class EndTask extends BalmJS.BalmTask {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
class ExtraTask extends BalmJS.BalmTask {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
class FontTask extends BalmJS.BalmTask {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
import { getDefaultImagePlugins } from '../../plugins/imagemin.js';
|
|
@@ -9,6 +9,7 @@ class ImageTask extends BalmJS.BalmTask {
|
|
|
9
9
|
this.init();
|
|
10
10
|
const balmImage = () => {
|
|
11
11
|
return gulp.src(BalmJS.file.absPaths(this.input), {
|
|
12
|
+
encoding: false,
|
|
12
13
|
since: gulp.lastRun(balmImage)
|
|
13
14
|
}).pipe(BalmJS.plugins.plumber(error => {
|
|
14
15
|
BalmJS.logger.error(`${this.name} task`, error);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
class LintTask extends BalmJS.BalmTask {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
class MediaTask extends BalmJS.BalmTask {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
function _classPrivateFieldInitSpec(
|
|
5
|
-
function _checkPrivateRedeclaration(
|
|
4
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
5
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
6
6
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
7
7
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
8
8
|
import { build } from 'modernizr';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
import { deleteAsync } from 'del';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4
4
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
5
5
|
import mergeStream from '../../utilities/merge-stream.js';
|
|
@@ -77,7 +77,9 @@ class SpriteTask extends BalmJS.BalmTask {
|
|
|
77
77
|
});
|
|
78
78
|
spriteConfig.params = _classPrivateFieldGet(_getParams, this).call(this, spriteItem, spriteOptions);
|
|
79
79
|
gulp.task(BalmJS.toNamespace(spriteTaskName), () => {
|
|
80
|
-
const spriteData = gulp.src(spriteConfig.input
|
|
80
|
+
const spriteData = gulp.src(spriteConfig.input, {
|
|
81
|
+
encoding: false
|
|
82
|
+
}).pipe(BalmJS.plugins.plumber(error => {
|
|
81
83
|
BalmJS.logger.error(`${this.name} task`, error.message);
|
|
82
84
|
})).pipe($.spritesmith(spriteConfig.params));
|
|
83
85
|
const imgStream = spriteData.img.pipe(gulp.dest(spriteConfig.imgOutput));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
class StartTask extends BalmJS.BalmTask {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
class WorkboxSwTask extends BalmJS.BalmTask {
|
package/lib/tasks/public/html.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4
4
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
5
5
|
import { PUBLIC_URL } from '../../config/constants.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4
4
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
5
5
|
import mergeStream from '../../utilities/merge-stream.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4
4
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
5
5
|
import { deleteAsync } from 'del';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4
4
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
5
5
|
import detectPort from '../../utilities/detect-port.js';
|
package/lib/tasks/public/url.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4
4
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
5
5
|
var _urlProcessing = /*#__PURE__*/new WeakMap();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
4
4
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
5
5
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
package/lib/utilities/loading.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
4
4
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
5
5
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
package/lib/utilities/logger.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function _classPrivateFieldInitSpec(
|
|
2
|
-
function _checkPrivateRedeclaration(
|
|
1
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
3
3
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
4
4
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
5
5
|
import util from 'node:util';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balm-core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "BalmJS compiler core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"balm",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"@rollup/plugin-terser": "^0.4.4",
|
|
45
45
|
"ansi-colors": "^4.1.3",
|
|
46
46
|
"async": "^3.2.5",
|
|
47
|
-
"autoprefixer": "^10.4.
|
|
47
|
+
"autoprefixer": "^10.4.20",
|
|
48
48
|
"babel-loader": "^9.1.3",
|
|
49
49
|
"browser-sync": "^3.0.2",
|
|
50
50
|
"connect-history-api-fallback": "^2.0.0",
|
|
51
|
-
"css-loader": "^7.1.
|
|
52
|
-
"css-minimizer-webpack-plugin": "^
|
|
53
|
-
"cssnano": "^7.0.
|
|
51
|
+
"css-loader": "^7.1.2",
|
|
52
|
+
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
53
|
+
"cssnano": "^7.0.5",
|
|
54
54
|
"del": "^7.1.0",
|
|
55
55
|
"dotenv": "^16.4.5",
|
|
56
56
|
"dotenv-expand": "^11.0.6",
|
|
57
|
-
"esbuild": "^0.
|
|
57
|
+
"esbuild": "^0.23.0",
|
|
58
58
|
"fancy-log": "^2.0.0",
|
|
59
59
|
"gulp-eslint": "^6.0.0",
|
|
60
60
|
"gulp-if": "^3.0.0",
|
|
@@ -64,47 +64,47 @@
|
|
|
64
64
|
"gulp-size": "^5.0.0",
|
|
65
65
|
"gulp-useref": "^5.0.0",
|
|
66
66
|
"gulp-zip": "^6.0.0",
|
|
67
|
-
"gulp.spritesmith": "^6.13.
|
|
68
|
-
"html-loader": "^5.
|
|
67
|
+
"gulp.spritesmith": "^6.13.1",
|
|
68
|
+
"html-loader": "^5.1.0",
|
|
69
69
|
"html-minifier": "^4.0.0",
|
|
70
70
|
"html-webpack-plugin": "^5.6.0",
|
|
71
71
|
"http-proxy-middleware": "^3.0.0",
|
|
72
|
-
"imagemin": "^
|
|
72
|
+
"imagemin": "^9.0.0",
|
|
73
73
|
"istextorbinary": "^9.5.0",
|
|
74
74
|
"less": "^4.2.0",
|
|
75
75
|
"mini-css-extract-plugin": "^2.9.0",
|
|
76
|
-
"modernizr": "^3.13.
|
|
76
|
+
"modernizr": "^3.13.1",
|
|
77
77
|
"parents": "^1.0.1",
|
|
78
78
|
"plugin-error": "^2.0.1",
|
|
79
|
-
"postcss": "^8.4.
|
|
79
|
+
"postcss": "^8.4.41",
|
|
80
80
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
81
81
|
"postcss-import": "^16.1.0",
|
|
82
|
-
"postcss-load-config": "^
|
|
82
|
+
"postcss-load-config": "^6.0.1",
|
|
83
83
|
"postcss-loader": "^8.1.1",
|
|
84
|
-
"postcss-preset-env": "^
|
|
84
|
+
"postcss-preset-env": "^10.0.1",
|
|
85
85
|
"pretty-bytes": "^6.1.1",
|
|
86
86
|
"readable-stream": "^4.5.2",
|
|
87
87
|
"replace-ext": "^2.0.0",
|
|
88
|
-
"rollup": "^4.
|
|
89
|
-
"sass": "^1.
|
|
90
|
-
"sass-loader": "^
|
|
91
|
-
"semver": "^7.6.
|
|
88
|
+
"rollup": "^4.20.0",
|
|
89
|
+
"sass": "^1.77.8",
|
|
90
|
+
"sass-loader": "^16.0.0",
|
|
91
|
+
"semver": "^7.6.3",
|
|
92
92
|
"ssh2": "^1.15.0",
|
|
93
93
|
"strip-ansi": "^7.1.0",
|
|
94
94
|
"style-loader": "^4.0.0",
|
|
95
|
-
"tailwindcss": "^3.4.
|
|
96
|
-
"terser": "^5.
|
|
95
|
+
"tailwindcss": "^3.4.10",
|
|
96
|
+
"terser": "^5.31.6",
|
|
97
97
|
"terser-webpack-plugin": "^5.3.10",
|
|
98
98
|
"through2": "^4.0.2",
|
|
99
99
|
"through2-concurrent": "^2.0.0",
|
|
100
|
-
"tslib": "^2.6.
|
|
100
|
+
"tslib": "^2.6.3",
|
|
101
101
|
"vinyl-sourcemaps-apply": "^0.2.1",
|
|
102
|
-
"webpack": "^5.
|
|
102
|
+
"webpack": "^5.93.0",
|
|
103
103
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
104
|
-
"webpack-dev-middleware": "^7.
|
|
104
|
+
"webpack-dev-middleware": "^7.3.0",
|
|
105
105
|
"webpack-hot-middleware": "^2.26.1",
|
|
106
|
-
"webpack-merge": "^
|
|
107
|
-
"workbox-build": "^7.1.
|
|
106
|
+
"webpack-merge": "^6.0.1",
|
|
107
|
+
"workbox-build": "^7.1.1"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@types/async": "3",
|
|
@@ -112,11 +112,12 @@
|
|
|
112
112
|
"@types/express": "4",
|
|
113
113
|
"@types/fancy-log": "2",
|
|
114
114
|
"@types/html-minifier": "4",
|
|
115
|
-
"@types/imagemin": "
|
|
115
|
+
"@types/imagemin": "9",
|
|
116
116
|
"@types/parents": "1",
|
|
117
117
|
"@types/postcss-flexbugs-fixes": "5",
|
|
118
118
|
"@types/readable-stream": "4",
|
|
119
119
|
"@types/replace-ext": "2",
|
|
120
|
+
"@types/semver": "7",
|
|
120
121
|
"@types/through2-concurrent": "2",
|
|
121
122
|
"@types/webpack-bundle-analyzer": "4",
|
|
122
123
|
"@types/webpack-hot-middleware": "2"
|
|
@@ -130,5 +131,5 @@
|
|
|
130
131
|
"engines": {
|
|
131
132
|
"node": ">=18.12.0"
|
|
132
133
|
},
|
|
133
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "c0b70cc1a9042401efbdc47d4a2eee59f1f2df1b"
|
|
134
135
|
}
|
|
@@ -38,9 +38,9 @@ function gulpImagemin(customPlugins) {
|
|
|
38
38
|
const plugins = customPlugins ?? getDefaultPlugins();
|
|
39
39
|
(async () => {
|
|
40
40
|
try {
|
|
41
|
-
const data = await imagemin.buffer(file.contents, {
|
|
41
|
+
const data = Buffer.from(await imagemin.buffer(file.contents, {
|
|
42
42
|
plugins
|
|
43
|
-
});
|
|
43
|
+
}));
|
|
44
44
|
const originalSize = file.contents.length;
|
|
45
45
|
const optimizedSize = data.length;
|
|
46
46
|
const saved = originalSize - optimizedSize;
|
|
@@ -37,6 +37,7 @@ class BalmStyleTask extends BalmTask {
|
|
|
37
37
|
const shouldUseSourceMap = !(BalmJS.config.env.isProd || BalmJS.config.styles.minify);
|
|
38
38
|
let stream = gulp
|
|
39
39
|
.src(this.input, Object.assign({
|
|
40
|
+
encoding: false,
|
|
40
41
|
sourcemaps: shouldUseSourceMap,
|
|
41
42
|
allowEmpty: true
|
|
42
43
|
}, this.gulpSrcOptions))
|
|
@@ -67,7 +67,7 @@ class SpriteTask extends BalmJS.BalmTask {
|
|
|
67
67
|
spriteConfig.params = __classPrivateFieldGet(this, _SpriteTask_getParams, "f").call(this, spriteItem, spriteOptions);
|
|
68
68
|
gulp.task(BalmJS.toNamespace(spriteTaskName), () => {
|
|
69
69
|
const spriteData = gulp
|
|
70
|
-
.src(spriteConfig.input)
|
|
70
|
+
.src(spriteConfig.input, { encoding: false })
|
|
71
71
|
.pipe(BalmJS.plugins.plumber((error) => {
|
|
72
72
|
BalmJS.logger.error(`${this.name} task`, error.message);
|
|
73
73
|
}))
|