balm-core 3.33.0 → 3.33.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/lib/plugins/sass.js +9 -6
- package/package.json +2 -2
- package/tslib/plugins/sass.js +8 -8
package/lib/plugins/sass.js
CHANGED
|
@@ -131,13 +131,16 @@ var gulpSass = function gulpSass(options) {
|
|
|
131
131
|
var _Object$entries$_i = (0, _slicedToArray2["default"])(_Object$entries[_i], 2),
|
|
132
132
|
key = _Object$entries$_i[0],
|
|
133
133
|
value = _Object$entries$_i[1];
|
|
134
|
-
opts.importer.push(function (url
|
|
135
|
-
if (
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
BalmJS.logger.debug("".concat(PLUGIN_NAME, " alias"), "".concat(key, " -> ").concat(importerPaths.join('/')));
|
|
134
|
+
opts.importer.push(function (url) {
|
|
135
|
+
if (url.startsWith(key)) {
|
|
136
|
+
var _file = url.replace(new RegExp("^".concat(key)), value);
|
|
137
|
+
BalmJS.logger.debug("".concat(PLUGIN_NAME, " alias"), "".concat(url, " -> ").concat(_file));
|
|
139
138
|
return {
|
|
140
|
-
file:
|
|
139
|
+
file: _file
|
|
140
|
+
};
|
|
141
|
+
} else {
|
|
142
|
+
return {
|
|
143
|
+
file: url
|
|
141
144
|
};
|
|
142
145
|
}
|
|
143
146
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balm-core",
|
|
3
|
-
"version": "3.33.
|
|
3
|
+
"version": "3.33.1",
|
|
4
4
|
"description": "BalmJS compiler core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"balm",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"engines": {
|
|
120
120
|
"node": ">=10.13.0"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "ecb3fa58e2a3a6811e3d07eb84c0f9e93b578aa4"
|
|
123
123
|
}
|
package/tslib/plugins/sass.js
CHANGED
|
@@ -80,14 +80,14 @@ const gulpSass = (options) => transformObj((file, encoding, callback) => {
|
|
|
80
80
|
if (!opts.importer && Object.keys(BalmJS.config.scripts.alias).length) {
|
|
81
81
|
opts.importer = [];
|
|
82
82
|
for (const [key, value] of Object.entries(BalmJS.config.scripts.alias)) {
|
|
83
|
-
opts.importer.push(function (url
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
};
|
|
83
|
+
opts.importer.push(function (url) {
|
|
84
|
+
if (url.startsWith(key)) {
|
|
85
|
+
const file = url.replace(new RegExp(`^${key}`), value);
|
|
86
|
+
BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${url} -> ${file}`);
|
|
87
|
+
return { file };
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
return { file: url };
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
}
|