Skip to content

Commit 2bde2f8

Browse files
author
zhaozhiwen
committed
chore(new-comp): 组件初始化脚本优化
1 parent 2508075 commit 2bde2f8

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.js
22
doc-comps
33
components/**/demo
4+
template

doczrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
2-
files: './components/**/*.{md,markdown,mdx}', // 识别的文件后缀
2+
src: 'components',
33
dest: 'doc-site', // 打包出来的文件目录名
44
title: 'happy-ui', // 站点标题
55
typescript: true, // 组件源文件是通过typescript开发,需要打开此选项

template/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{line_for_keep_metadata}}
22
name: {{compNameEN}} {{compNameZH}}
33
route: /{{compNameEN}}
4-
menu: {{compNameEN}}
4+
menu: 组件
55
{{line_for_keep_metadata}}
66

77
import CodeBox from '../../doc-comps/happy-box';

template/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface State {}
88
class {{compNameEN}} extends Component<Props, State> {
99
static propTypes = {};
1010

11-
static defaultProps: Partial<Props> = {};
11+
static defaultProps = {};
1212

1313
constructor(props: Props) {
1414
super(props);

0 commit comments

Comments
 (0)