gant-core 0.1.5 → 0.1.6
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/cli/index.js +603 -22951
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/template/auto-css-loader.js +17 -0
- package/package.json +3 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const loaderUtils = require('loader-utils');
|
|
2
|
+
const cssLoader = require('css-loader');
|
|
3
|
+
const lessLoader = require('less-loader');
|
|
4
|
+
|
|
5
|
+
module.exports = function (source) {
|
|
6
|
+
const options = loaderUtils.getOptions(this) || {};
|
|
7
|
+
|
|
8
|
+
if (options.modules) {
|
|
9
|
+
if (this.resourceQuery) {
|
|
10
|
+
return cssLoader.call(this, source);
|
|
11
|
+
} else {
|
|
12
|
+
return cssLoader.call(this, lessLoader.call(this, source));
|
|
13
|
+
}
|
|
14
|
+
} else {
|
|
15
|
+
return cssLoader.call(this, source);
|
|
16
|
+
}
|
|
17
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gant-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"@types/lodash-es": "^4.17.12",
|
|
23
23
|
"@types/node": "^20.11.16",
|
|
24
24
|
"@types/tmp": "^0.2.6",
|
|
25
|
-
"autoprefixer": "^10.4.19",
|
|
26
25
|
"cli-progress": "^3.12.0",
|
|
27
26
|
"commander": "^11.1.0",
|
|
28
27
|
"ejs": "^3.1.9",
|
|
@@ -63,7 +62,9 @@
|
|
|
63
62
|
"file-loader": "^6.2.0",
|
|
64
63
|
"html-loader": "^5.0.0",
|
|
65
64
|
"html-webpack-plugin": "^5.0.0",
|
|
65
|
+
"less": "^4.2.0",
|
|
66
66
|
"less-loader": "^12.2.0",
|
|
67
|
+
"loader-utils": "^3.2.1",
|
|
67
68
|
"mini-css-extract-plugin": "^2.8.1",
|
|
68
69
|
"mitt": "^3.0.1",
|
|
69
70
|
"postcss": "^8.4.35",
|