balm-core 3.33.3 → 3.34.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/lib/bootstrap/index.js
CHANGED
package/lib/config/paths.js
CHANGED
|
@@ -19,7 +19,6 @@ var source = {
|
|
|
19
19
|
// Font directory: `src/fonts`
|
|
20
20
|
media: 'media' // Media directory: `src/media`
|
|
21
21
|
};
|
|
22
|
-
|
|
23
22
|
var tmp = {
|
|
24
23
|
base: '',
|
|
25
24
|
// `.tmp`
|
|
@@ -33,7 +32,6 @@ var tmp = {
|
|
|
33
32
|
// `.tmp/fonts`
|
|
34
33
|
media: 'media' // `.tmp/media`
|
|
35
34
|
};
|
|
36
|
-
|
|
37
35
|
var target = {
|
|
38
36
|
base: '',
|
|
39
37
|
// `dist`
|
package/lib/plugins/sass.js
CHANGED
|
@@ -129,14 +129,14 @@ var gulpSass = function gulpSass(options) {
|
|
|
129
129
|
return /^@[a-z0-9-]{1,213}/.test(key);
|
|
130
130
|
});
|
|
131
131
|
if (aliasKeys.length) {
|
|
132
|
-
var aliasKeyRegex = new RegExp("^".concat(aliasKeys.join('|')));
|
|
132
|
+
var aliasKeyRegex = new RegExp("^(".concat(aliasKeys.join('|'), ")/"));
|
|
133
133
|
opts.importer = [function (url) {
|
|
134
134
|
var file = url;
|
|
135
135
|
var result = url.match(aliasKeyRegex);
|
|
136
|
-
var key = result ? result[
|
|
136
|
+
var key = result ? result[1] : null;
|
|
137
137
|
if (key) {
|
|
138
|
-
file = url.replace(
|
|
139
|
-
BalmJS.logger.debug("".concat(PLUGIN_NAME, " alias"), "".concat(
|
|
138
|
+
file = url.replace(key, BalmJS.config.scripts.alias[key]);
|
|
139
|
+
BalmJS.logger.debug("".concat(PLUGIN_NAME, " alias"), "".concat(key, " -> ").concat(url, " => ").concat(file));
|
|
140
140
|
}
|
|
141
141
|
return {
|
|
142
142
|
file: file
|
|
@@ -48,7 +48,6 @@ var SpriteTask = /*#__PURE__*/function (_BalmJS$BalmTask) {
|
|
|
48
48
|
cssVarMap: function cssVarMap(sprite) {
|
|
49
49
|
sprite.name = "".concat(spriteItem.folderName, "-").concat(sprite.name); // E.g. "awesome-icon-name"
|
|
50
50
|
},
|
|
51
|
-
|
|
52
51
|
cssSpritesheetName: "".concat(spriteItem.folderName, "-spritesheet"),
|
|
53
52
|
// E.g. "awesome-spritesheet"
|
|
54
53
|
cssOpts: {
|
|
@@ -57,7 +56,6 @@ var SpriteTask = /*#__PURE__*/function (_BalmJS$BalmTask) {
|
|
|
57
56
|
} // className in css file: '.icon-awesome'
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
|
-
|
|
61
59
|
if (stylesConfig.spriteRetina) {
|
|
62
60
|
defaultParams = Object.assign(defaultParams, {
|
|
63
61
|
retinaSrcFilter: "".concat(spriteItem.retinaSrc),
|
|
@@ -68,13 +66,11 @@ var SpriteTask = /*#__PURE__*/function (_BalmJS$BalmTask) {
|
|
|
68
66
|
cssVarMap: function cssVarMap(sprite) {
|
|
69
67
|
sprite.name = "".concat(spriteItem.folderName, "-").concat(sprite.name); // E.g. "awesome-icon-name"
|
|
70
68
|
},
|
|
71
|
-
|
|
72
69
|
cssRetinaSpritesheetName: "".concat(spriteItem.folderName, "-spritesheet-2x"),
|
|
73
70
|
// E.g. "awesome-spritesheet-2x"
|
|
74
71
|
cssRetinaGroupsName: "".concat(spriteItem.folderName, "-retina-groups") // E.g. "awesome-retina-groups"
|
|
75
72
|
});
|
|
76
73
|
}
|
|
77
|
-
|
|
78
74
|
return Object.assign(defaultParams, stylesConfig.spriteParams);
|
|
79
75
|
}
|
|
80
76
|
});
|
|
@@ -108,7 +104,6 @@ var SpriteTask = /*#__PURE__*/function (_BalmJS$BalmTask) {
|
|
|
108
104
|
imgOutput: BalmJS.file.absPath(_this2.output),
|
|
109
105
|
cssOutput: BalmJS.file.absPath("".concat(BalmJS.config.src.css, "/").concat(_this2.name, "s")) // E.g. 'path/to/css/sprites'
|
|
110
106
|
};
|
|
111
|
-
|
|
112
107
|
BalmJS.logger.debug("".concat(_this2.name, " task"), spriteConfig, {
|
|
113
108
|
pre: true
|
|
114
109
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balm-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.0",
|
|
4
4
|
"description": "BalmJS compiler core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"balm",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"ansi-colors": "^4.1.3",
|
|
44
|
-
"async": "^3.2.
|
|
44
|
+
"async": "^3.2.5",
|
|
45
45
|
"autoprefixer": "9",
|
|
46
46
|
"babel-loader": "8",
|
|
47
47
|
"browser-sync": "^2.29.3",
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
"gulp-rev-delete-original": "^0.2.3",
|
|
60
60
|
"gulp-size": "3",
|
|
61
61
|
"gulp-useref": "^5.0.0",
|
|
62
|
-
"gulp-zip": "
|
|
62
|
+
"gulp-zip": "5",
|
|
63
63
|
"gulp.spritesmith": "^6.13.0",
|
|
64
64
|
"html-loader": "1",
|
|
65
65
|
"html-minifier": "^4.0.0",
|
|
66
66
|
"html-webpack-plugin": "4",
|
|
67
67
|
"http-proxy-middleware": "1",
|
|
68
68
|
"imagemin": "7",
|
|
69
|
-
"istextorbinary": "
|
|
69
|
+
"istextorbinary": "6",
|
|
70
70
|
"less": "^4.2.0",
|
|
71
71
|
"mini-css-extract-plugin": "1",
|
|
72
72
|
"modernizr": "^3.13.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"strip-ansi": "6",
|
|
92
92
|
"style-loader": "2",
|
|
93
93
|
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
|
|
94
|
-
"terser": "^5.
|
|
94
|
+
"terser": "^5.26.0",
|
|
95
95
|
"terser-webpack-plugin": "4",
|
|
96
96
|
"through2": "^4.0.2",
|
|
97
97
|
"through2-concurrent": "^2.0.0",
|
|
@@ -99,10 +99,10 @@
|
|
|
99
99
|
"url-loader": "4",
|
|
100
100
|
"vinyl-sourcemaps-apply": "^0.2.1",
|
|
101
101
|
"webpack": "4",
|
|
102
|
-
"webpack-bundle-analyzer": "^4.
|
|
102
|
+
"webpack-bundle-analyzer": "^4.10.1",
|
|
103
103
|
"webpack-dev-middleware": "3",
|
|
104
104
|
"webpack-hot-middleware": "^2.25.4",
|
|
105
|
-
"webpack-merge": "^5.
|
|
105
|
+
"webpack-merge": "^5.10.0",
|
|
106
106
|
"workbox-build": "^7.0.0"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"engines": {
|
|
120
120
|
"node": ">=10.13.0"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "927cc9422d11209d7a91dc8f3b065c46471b6af2"
|
|
123
123
|
}
|
package/tslib/plugins/sass.js
CHANGED
|
@@ -80,15 +80,15 @@ const gulpSass = (options) => transformObj((file, encoding, callback) => {
|
|
|
80
80
|
if (!opts.importer) {
|
|
81
81
|
const aliasKeys = Object.keys(BalmJS.config.scripts.alias).filter((key) => /^@[a-z0-9-]{1,213}/.test(key));
|
|
82
82
|
if (aliasKeys.length) {
|
|
83
|
-
const aliasKeyRegex = new RegExp(
|
|
83
|
+
const aliasKeyRegex = new RegExp(`^(${aliasKeys.join('|')})/`);
|
|
84
84
|
opts.importer = [
|
|
85
85
|
function (url) {
|
|
86
86
|
let file = url;
|
|
87
87
|
const result = url.match(aliasKeyRegex);
|
|
88
|
-
const key = result ? result[
|
|
88
|
+
const key = result ? result[1] : null;
|
|
89
89
|
if (key) {
|
|
90
|
-
file = url.replace(
|
|
91
|
-
BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${
|
|
90
|
+
file = url.replace(key, BalmJS.config.scripts.alias[key]);
|
|
91
|
+
BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${key} -> ${url} => ${file}`);
|
|
92
92
|
}
|
|
93
93
|
return { file };
|
|
94
94
|
}
|