Skip to content

Commit

Permalink
docs: guide of theme dev (ant-design#33756)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored and Amour1688 committed Jan 30, 2022
1 parent 77bb001 commit bfe128c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/react/contributing.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ After cloning antd, run `npm install` to fetch its dependencies. Then, you can r
1. `npm run compile` compiles TypeScript code to the `lib` and `es` directory.
1. `npm run dist` creates UMD build of antd.

### Switch Theme

Use `DEV_THEME` to change start theme:

```bash
DEV_THEME=dark npm start
```

## Being a collaborator

If you are an active contributor and are willing to work with Ant Design Team in our opensource workflow, you can [apply to be a outside collaborator](https://github.com/ant-design/ant-design/wiki/Collaborators#how-to-apply-for-being-a-collaborator).
8 changes: 8 additions & 0 deletions docs/react/contributing.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ Ant Design 团队会关注所有的 pull request,我们会 review 以及合并
4. `npm run compile` 编译 TypeScript 代码到 lib 和 es 目录。
5. `npm run dist` 构建 antd 的 UMD 版本到 dist 目录。

### 切换主题

在启动时,设置需要执行的主题:

```bash
DEV_THEME=dark npm start
```

## 加入社区

如果你贡献度足够活跃,希望和 Ant Design 团队一起参与维护工作,你可以[申请成为社区协作者](https://github.com/ant-design/ant-design/wiki/Collaborators#how-to-apply-for-being-a-collaborator)
Expand Down
4 changes: 2 additions & 2 deletions site/bisheng.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const themeConfig = require('./themeConfig');
const { webpack } = getWebpackConfig;

const isDev = process.env.NODE_ENV === 'development';
const { ANT_THEME } = process.env;
const { ANT_THEME, DEV_THEME } = process.env;

function alertBabelConfig(rules) {
rules.forEach(rule => {
Expand Down Expand Up @@ -58,7 +58,7 @@ module.exports = {
lessConfig: {
javascriptEnabled: true,
modifyVars: {
'root-entry-name': ANT_THEME || 'variable',
'root-entry-name': ANT_THEME || DEV_THEME || 'variable',
},
},
webpackConfig(config) {
Expand Down

0 comments on commit bfe128c

Please sign in to comment.