From f0a4e211b150e895cb0c7a7e410cbd180c35d3ca Mon Sep 17 00:00:00 2001 From: Zohaib Ijaz Date: Mon, 25 May 2020 15:58:15 +0500 Subject: [PATCH] imported missing variable imports which are required to compile less files to css (#24450) --- package.json | 4 ++-- scripts/generate-color-less.js | 5 +++-- site/theme/static/theme.less | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 427190ab53..d845a85a7f 100644 --- a/package.json +++ b/package.json @@ -173,8 +173,8 @@ "@typescript-eslint/eslint-plugin": "^3.0.0", "@typescript-eslint/parser": "^3.0.0", "antd-img-crop": "^3.1.1", - "antd-pro-merge-less": "^3.0.3", - "antd-theme-generator": "1.2.2", + "antd-pro-merge-less": "^3.0.9", + "antd-theme-generator": "^1.2.3", "babel-eslint": "^10.0.1", "babel-plugin-add-react-displayname": "^0.0.5", "bisheng": "^1.5.1", diff --git a/scripts/generate-color-less.js b/scripts/generate-color-less.js index c019740da6..3b3ce5ea92 100644 --- a/scripts/generate-color-less.js +++ b/scripts/generate-color-less.js @@ -38,9 +38,10 @@ genCss( ); const options = { + antDir: path.join(__dirname, '../node_modules/antd'), stylesDir: path.join(__dirname, '../site/theme/static'), - antdStylesDir: path.join(__dirname, '../components'), - varFile: path.join(__dirname, '../components/style/themes/default.less'), + antdStylesDir: path.join(__dirname, '../node_modules/antd/lib/'), + varFile: path.join(__dirname, '../site/theme/static/theme.less'), mainLessFile: path.join(__dirname, '../site/theme/static/index.less'), themeVariables: ['@primary-color'], outputFilePath: path.join(__dirname, '../_site/color.less'), diff --git a/site/theme/static/theme.less b/site/theme/static/theme.less index 09fd7b1f23..6611f87556 100644 --- a/site/theme/static/theme.less +++ b/site/theme/static/theme.less @@ -1,3 +1,7 @@ +@import '../../../components/style/themes/default.less'; +@import './colors.less'; +@import './home.less'; + @site-heading-color: @heading-color; @site-text-color: @heading-color; @site-text-color-secondary: @text-color-secondary;