@mlut/core 2.1.2 → 2.1.3
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 +3 -3
- package/dist/jit/JitEngine.js +9 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# mlut core #
|
|
2
2
|
|
|
3
|
-
<img alt="Logo" src="https://github.com/
|
|
3
|
+
<img alt="Logo" src="https://github.com/mlutcss/mlut/raw/master/docs/img/logo-full.png" width="350"/>
|
|
4
4
|
|
|
5
|
-
The [mlut](https://github.com/
|
|
5
|
+
The [mlut](https://github.com/mlutcss/mlut) core contains:
|
|
6
6
|
- Sass tools
|
|
7
7
|
- CSS library
|
|
8
8
|
- JIT engine
|
|
@@ -18,7 +18,7 @@ When using this package, you will need to install Sass separately. We recommend
|
|
|
18
18
|
This allows you to control the versions of all your dependencies, and to choose which Sass implementation to use.
|
|
19
19
|
|
|
20
20
|
## Documentation ##
|
|
21
|
-
Full documentation available [here](https://
|
|
21
|
+
Full documentation available [here](https://mlutcss.github.io/mlut/)
|
|
22
22
|
|
|
23
23
|
## License ##
|
|
24
24
|
MIT
|
package/dist/jit/JitEngine.js
CHANGED
|
@@ -68,7 +68,14 @@ export class JitEngine {
|
|
|
68
68
|
logger.warn('No content to generate CSS was found!');
|
|
69
69
|
return '';
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const mainUtils = [];
|
|
72
|
+
const atRuleUtils = [];
|
|
73
|
+
for (const [main, withAr] of this.utilsByFile.values()) {
|
|
74
|
+
mainUtils.push(main);
|
|
75
|
+
atRuleUtils.push(withAr);
|
|
76
|
+
}
|
|
77
|
+
const sortedAtRuleUtils = atRuleUtils.flat().sort(this.compareUtilsWithAtRule);
|
|
78
|
+
const allUniqueUtils = [...new Set(mainUtils.flat().concat(sortedAtRuleUtils))];
|
|
72
79
|
const applyStr = `\n@include ${this.sassModuleName}.apply(${JSON.stringify(allUniqueUtils)},(),true);`;
|
|
73
80
|
return sass.compileStringAsync(this.inputFileCache + applyStr, { loadPaths: [this.inputFileDir, 'node_modules'] }).then(({ css }) => css, (e) => (logger.error('Sass compilation error.', e), ''));
|
|
74
81
|
}
|
|
@@ -111,7 +118,7 @@ export class JitEngine {
|
|
|
111
118
|
}
|
|
112
119
|
return acc;
|
|
113
120
|
}, new Set())];
|
|
114
|
-
return mainUtils
|
|
121
|
+
return [mainUtils, [...utilsWithAtRule]];
|
|
115
122
|
}
|
|
116
123
|
compareUtilsWithAtRule = (a, b) => {
|
|
117
124
|
if (a[0] === '@' && b[0] === '@') {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlut/core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Atomic CSS toolkit with Sass and ergonomics for creating styles of any complexity",
|
|
5
5
|
"author": "mr150",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"homepage": "https://
|
|
8
|
+
"homepage": "https://mlut.style/",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"mlut",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
23
|
"directory": "packages/core",
|
|
24
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/mlutcss/mlut.git"
|
|
25
25
|
},
|
|
26
26
|
"bugs": {
|
|
27
|
-
"url": "https://github.com/
|
|
27
|
+
"url": "https://github.com/mlutcss/mlut/issues"
|
|
28
28
|
},
|
|
29
29
|
"exports": {
|
|
30
30
|
".": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
],
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.10.5",
|
|
44
|
-
"sass
|
|
45
|
-
"sass": "^1.
|
|
44
|
+
"sass": "^1.93.0",
|
|
45
|
+
"sass-embedded": "^1.93.0",
|
|
46
46
|
"typescript": "^4.8.0"
|
|
47
47
|
}
|
|
48
48
|
}
|