balm-core 3.22.0 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -16
- package/lib/config/globals.js +1 -1
- package/lib/plugins/sass.js +88 -78
- package/lib/utilities/loading.js +3 -1
- package/package.json +15 -15
- package/tslib/balm.js +6 -6
- package/tslib/bootstrap/index.js +1 -1
- package/tslib/bundler/esbuild/index.js +2 -2
- package/tslib/bundler/esbuild/transform.js +2 -2
- package/tslib/bundler/rollup/index.js +4 -4
- package/tslib/bundler/webpack/config/common.js +1 -1
- package/tslib/bundler/webpack/config/dev.js +2 -2
- package/tslib/bundler/webpack/config/index.js +2 -2
- package/tslib/bundler/webpack/config/prod.js +2 -2
- package/tslib/bundler/webpack/index.js +4 -4
- package/tslib/bundler/webpack/loaders.js +2 -2
- package/tslib/config/globals.js +4 -4
- package/tslib/config/index.js +13 -13
- package/tslib/config/version.js +1 -1
- package/tslib/hello.js +1 -1
- package/tslib/hooks/index.js +1 -1
- package/tslib/index.js +2 -2
- package/tslib/middlewares/index.js +3 -3
- package/tslib/plugins/imagemin.js +1 -1
- package/tslib/plugins/index.js +11 -11
- package/tslib/plugins/less.js +3 -3
- package/tslib/plugins/postcss.js +1 -1
- package/tslib/plugins/replace.js +1 -1
- package/tslib/plugins/sass.js +52 -55
- package/tslib/plugins/sftp.js +1 -1
- package/tslib/tasks/foundation/balm_style.js +1 -1
- package/tslib/tasks/foundation/index.js +2 -2
- package/tslib/tasks/index.js +3 -3
- package/tslib/tasks/private/clean.js +2 -2
- package/tslib/tasks/private/modernizr.js +4 -4
- package/tslib/tasks/private/sprite.js +4 -4
- package/tslib/tasks/public/esbuild.js +1 -1
- package/tslib/tasks/public/html.js +5 -5
- package/tslib/tasks/public/publish.js +3 -3
- package/tslib/tasks/public/remove.js +1 -1
- package/tslib/tasks/public/rollup.js +1 -1
- package/tslib/tasks/public/server.js +9 -9
- package/tslib/tasks/public/url.js +2 -2
- package/tslib/tasks/public/webpack.js +1 -1
- package/tslib/utilities/address.js +1 -1
- package/tslib/utilities/cache-core.js +3 -3
- package/tslib/utilities/color.js +1 -1
- package/tslib/utilities/compiling.js +4 -4
- package/tslib/utilities/detect-port.js +2 -2
- package/tslib/utilities/file.js +2 -2
- package/tslib/utilities/index.js +4 -4
- package/tslib/utilities/loading.js +8 -8
- package/tslib/utilities/logger.js +8 -8
- package/tslib/utilities/replacestream.js +1 -1
- package/tslib/utilities/utils.js +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
var _BalmLoading_stream, _BalmLoading_frameIndex, _BalmLoading_frameCount;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const readline_1 =
|
|
6
|
-
const spinner_1 =
|
|
7
|
-
const version_1 =
|
|
5
|
+
const readline_1 = tslib_1.__importDefault(require("readline"));
|
|
6
|
+
const spinner_1 = tslib_1.__importDefault(require("../config/spinner"));
|
|
7
|
+
const version_1 = tslib_1.__importDefault(require("../config/version"));
|
|
8
8
|
class BalmLoading {
|
|
9
9
|
constructor() {
|
|
10
10
|
_BalmLoading_stream.set(this, process.stderr);
|
|
@@ -13,17 +13,17 @@ class BalmLoading {
|
|
|
13
13
|
}
|
|
14
14
|
get frame() {
|
|
15
15
|
var _a;
|
|
16
|
-
const currentFrame = spinner_1.default.frames[
|
|
17
|
-
|
|
16
|
+
const currentFrame = spinner_1.default.frames[tslib_1.__classPrivateFieldGet(this, _BalmLoading_frameIndex, "f")];
|
|
17
|
+
tslib_1.__classPrivateFieldSet(this, _BalmLoading_frameIndex, tslib_1.__classPrivateFieldSet(this, _BalmLoading_frameIndex, (_a = tslib_1.__classPrivateFieldGet(this, _BalmLoading_frameIndex, "f"), ++_a), "f") % tslib_1.__classPrivateFieldGet(this, _BalmLoading_frameCount, "f"), "f");
|
|
18
18
|
return currentFrame;
|
|
19
19
|
}
|
|
20
20
|
clear() {
|
|
21
|
-
readline_1.default.clearLine(
|
|
22
|
-
readline_1.default.cursorTo(
|
|
21
|
+
readline_1.default.clearLine(tslib_1.__classPrivateFieldGet(this, _BalmLoading_stream, "f"), 0);
|
|
22
|
+
readline_1.default.cursorTo(tslib_1.__classPrivateFieldGet(this, _BalmLoading_stream, "f"), 0);
|
|
23
23
|
}
|
|
24
24
|
render(text = `${this.frame} BalmJS is initializing...`) {
|
|
25
25
|
this.clear();
|
|
26
|
-
|
|
26
|
+
tslib_1.__classPrivateFieldGet(this, _BalmLoading_stream, "f").write(text);
|
|
27
27
|
}
|
|
28
28
|
succeed() {
|
|
29
29
|
this.clear();
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
var _Logger_log;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const util_1 =
|
|
6
|
-
const fancy_log_1 =
|
|
7
|
-
const color_1 =
|
|
5
|
+
const util_1 = tslib_1.__importDefault(require("util"));
|
|
6
|
+
const fancy_log_1 = tslib_1.__importDefault(require("fancy-log"));
|
|
7
|
+
const color_1 = tslib_1.__importDefault(require("./color"));
|
|
8
8
|
const LOG = {
|
|
9
9
|
FORMAT: '%s %s %s',
|
|
10
10
|
PREFIX: (0, color_1.default)('BalmJS', {
|
|
@@ -57,7 +57,7 @@ class Logger {
|
|
|
57
57
|
}, options);
|
|
58
58
|
if (BalmJS.config.logs.level <= logOptions.logLevel) {
|
|
59
59
|
console.log(LOG.beginning);
|
|
60
|
-
(0, fancy_log_1.default)(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.OK),
|
|
60
|
+
(0, fancy_log_1.default)(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.OK), tslib_1.__classPrivateFieldGet(this, _Logger_log, "f").call(this, message, logOptions.pre));
|
|
61
61
|
console.log(LOG.end);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -66,7 +66,7 @@ class Logger {
|
|
|
66
66
|
logLevel: BalmJS.LogLevel.Debug
|
|
67
67
|
}, options);
|
|
68
68
|
if (BalmJS.config.logs.level <= logOptions.logLevel) {
|
|
69
|
-
fancy_log_1.default.info(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.DEBUG),
|
|
69
|
+
fancy_log_1.default.info(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.DEBUG), tslib_1.__classPrivateFieldGet(this, _Logger_log, "f").call(this, message, logOptions.pre));
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
info(label, message, options = {}) {
|
|
@@ -74,7 +74,7 @@ class Logger {
|
|
|
74
74
|
logLevel: BalmJS.LogLevel.Info
|
|
75
75
|
}, options);
|
|
76
76
|
if (BalmJS.config.logs.level <= logOptions.logLevel) {
|
|
77
|
-
fancy_log_1.default.info(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.INFO),
|
|
77
|
+
fancy_log_1.default.info(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.INFO), tslib_1.__classPrivateFieldGet(this, _Logger_log, "f").call(this, message, logOptions.pre));
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
warn(label, message, options = {}) {
|
|
@@ -82,7 +82,7 @@ class Logger {
|
|
|
82
82
|
logLevel: BalmJS.LogLevel.Warn
|
|
83
83
|
}, options);
|
|
84
84
|
if (BalmJS.config.logs.level <= logOptions.logLevel) {
|
|
85
|
-
fancy_log_1.default.warn(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.WARN),
|
|
85
|
+
fancy_log_1.default.warn(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.WARN), tslib_1.__classPrivateFieldGet(this, _Logger_log, "f").call(this, message, logOptions.pre));
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
error(label, message, options = {}) {
|
|
@@ -91,7 +91,7 @@ class Logger {
|
|
|
91
91
|
pre: false
|
|
92
92
|
}, options);
|
|
93
93
|
if (BalmJS.config.logs.level <= logOptions.logLevel) {
|
|
94
|
-
fancy_log_1.default.error(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.ERROR),
|
|
94
|
+
fancy_log_1.default.error(LOG.FORMAT, LOG.PREFIX, (0, color_1.default)(`<${label}>`, LOG.ERROR), tslib_1.__classPrivateFieldGet(this, _Logger_log, "f").call(this, message, logOptions.pre));
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const escape_string_regexp_1 =
|
|
4
|
+
const escape_string_regexp_1 = tslib_1.__importDefault(require("./escape-string-regexp"));
|
|
5
5
|
function createReplaceFn(replace, isRegEx) {
|
|
6
6
|
function regexReplaceFunction(...args) {
|
|
7
7
|
let newReplace = replace;
|
package/tslib/utilities/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const typeof_1 =
|
|
4
|
+
const typeof_1 = tslib_1.__importDefault(require("./typeof"));
|
|
5
5
|
function isString(str) {
|
|
6
6
|
return (0, typeof_1.default)(str) === 'string';
|
|
7
7
|
}
|