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 ``` 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) || {} : {}; }