From 5e2fba623aeaf486a710ec5eabe543b0e553547e Mon Sep 17 00:00:00 2001 From: dailer Date: Fri, 28 Jul 2023 14:15:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=20=E5=8E=BBless.config.json?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=94=B9=E6=88=90=E5=92=8C=E4=BB=A5=E5=89=8D?= =?UTF-8?q?=E4=B8=80=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/{lessconfig => }/bi.lessconfig.json | 0 packages/fineui/{lessconfig => }/jsy.lessconfig.json | 0 packages/fineui/webpack/webpack.common.js | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename packages/fineui/{lessconfig => }/bi.lessconfig.json (100%) rename packages/fineui/{lessconfig => }/jsy.lessconfig.json (100%) diff --git a/packages/fineui/lessconfig/bi.lessconfig.json b/packages/fineui/bi.lessconfig.json similarity index 100% rename from packages/fineui/lessconfig/bi.lessconfig.json rename to packages/fineui/bi.lessconfig.json diff --git a/packages/fineui/lessconfig/jsy.lessconfig.json b/packages/fineui/jsy.lessconfig.json similarity index 100% rename from packages/fineui/lessconfig/jsy.lessconfig.json rename to packages/fineui/jsy.lessconfig.json diff --git a/packages/fineui/webpack/webpack.common.js b/packages/fineui/webpack/webpack.common.js index 7cb4c1f04..530372b1a 100644 --- a/packages/fineui/webpack/webpack.common.js +++ b/packages/fineui/webpack/webpack.common.js @@ -14,7 +14,7 @@ let lessVariables = {}; if (process.env.LESS_CONFIG_PATH) { const lessConfigPath = path.isAbsolute(process.env.LESS_CONFIG_PATH) ? process.env.LESS_CONFIG_PATH - : path.resolve(__dirname, process.env.LESS_CONFIG_PATH); + : path.resolve(__dirname, "../", process.env.LESS_CONFIG_PATH); lessVariables = fs.existsSync(lessConfigPath) ? require(lessConfigPath) || {} : {}; } From 895ede189f5cbf956f9f8fd61dbca8ac37a454f7 Mon Sep 17 00:00:00 2001 From: dailer Date: Fri, 28 Jul 2023 14:15:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README b/README index b050a1689..d58d4b0b3 100644 --- a/README +++ b/README @@ -23,9 +23,12 @@ http://fanruan.design/doc.html?post=0169cf558d `pnpm run build` ## 自定义less变量构建 +``` +cross-env LESS_CONFIG_PATH=your_less_config.json && pnpm build +``` +## 构建自定义的css ``` -cd ./packages/fineui cross-env LESS_CONFIG_PATH=your_less_config.json LESS_FILE_NAME=your_file_name pnpm --filter @fui/core webpack:css ```