diff --git a/.antd-tools.config.js b/.antd-tools.config.js index bb726dbb4b..b64278b844 100644 --- a/.antd-tools.config.js +++ b/.antd-tools.config.js @@ -60,16 +60,16 @@ function finalizeDist() { // eslint-disable-next-line console.log('Built a entry less file to dist/antd.less'); - // Build less entry file: dist/dark.less + // Build less entry file: dist/antd.dark.less fs.writeFileSync( - path.join(process.cwd(), 'dist', 'dark.less'), + path.join(process.cwd(), 'dist', 'antd.dark.less'), '@import "../lib/style/dark.less";\n@import "../lib/style/components.less";', ); // eslint-disable-next-line - console.log('Built a entry less file to dist/dark.less'); + console.log('Built a entry less file to dist/antd.dark.less'); - // Build dark.js: dist/dark.js, for less-loader + // Build dark.js: dist/dark-theme.js, for less-loader const stylePath = path.join(process.cwd(), 'components', 'style'); const colorLess = fs.readFileSync(path.join(stylePath, 'color', 'colors.less'), 'utf8'); @@ -82,12 +82,12 @@ function finalizeDist() { }); fs.writeFileSync( - path.join(process.cwd(), 'dist', 'dark.js'), + path.join(process.cwd(), 'dist', 'dark-theme.js'), `module.exports = ${JSON.stringify(darkPaletteLess, null, 2)};`, ); // eslint-disable-next-line - console.log('Built a dark theme js file to dist/dark.js'); + console.log('Built a dark theme js file to dist/dark-theme.js'); } } diff --git a/docs/react/customize-theme.en-US.md b/docs/react/customize-theme.en-US.md index 04d3cf476e..fc892d3d66 100644 --- a/docs/react/customize-theme.en-US.md +++ b/docs/react/customize-theme.en-US.md @@ -104,16 +104,16 @@ Note: This way will load the styles of all components, regardless of your demand ![](https://gw.alipayobjects.com/zos/antfincdn/wp6GpGo%26ID/f31e18a4-2018-4e12-95c6-998e7ac5b2fa.png) -include `antd/dist/dark.less` in the style file: +include `antd/dist/antd.dark.less` in the style file: ```less -@import '~antd/dist/dark.less'; // Introduce the official dark less style entry file +@import '~antd/dist/antd.dark.less'; // Introduce the official dark less style entry file ``` Another approach to using [less-loader](https://github.com/webpack-contrib/less-loader) in `webpack.config.js` to introduce as needed: ```diff -const darkThemeVars = require('antd/dist/dark'); +const darkThemeVars = require('antd/dist/dark-theme'); // webpack.config.js module.exports = { diff --git a/docs/react/customize-theme.zh-CN.md b/docs/react/customize-theme.zh-CN.md index 078cc9d5aa..d2c0a28a99 100644 --- a/docs/react/customize-theme.zh-CN.md +++ b/docs/react/customize-theme.zh-CN.md @@ -104,16 +104,16 @@ module.exports = { ![](https://gw.alipayobjects.com/zos/antfincdn/wp6GpGo%26ID/f31e18a4-2018-4e12-95c6-998e7ac5b2fa.png) -一种方式是在样式文件全量引入 `antd/dist/dark.less`: +一种方式是在样式文件全量引入 `antd/dist/antd.dark.less`: ```less -@import '~antd/dist/dark.less'; // 引入官方提供的暗色 less 样式入口文件 +@import '~antd/dist/antd.dark.less'; // 引入官方提供的暗色 less 样式入口文件 ``` 另一种是用在 `webpack.config.js` 使用 [less-loader](https://github.com/webpack-contrib/less-loader) 按需引入: ```diff -const darkThemeVars = require('antd/dist/dark'); +const darkThemeVars = require('antd/dist/dark-theme'); // webpack.config.js module.exports = {