Skip to content

Commit

Permalink
chore(new-comp): 组件初始化脚本优化
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozhiwen committed Feb 14, 2020
1 parent 2508075 commit 2bde2f8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.js
doc-comps
components/**/demo
template
2 changes: 1 addition & 1 deletion doczrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
files: './components/**/*.{md,markdown,mdx}', // 识别的文件后缀
src: 'components',
dest: 'doc-site', // 打包出来的文件目录名
title: 'happy-ui', // 站点标题
typescript: true, // 组件源文件是通过typescript开发,需要打开此选项
Expand Down
2 changes: 1 addition & 1 deletion template/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{line_for_keep_metadata}}
name: {{compNameEN}} {{compNameZH}}
route: /{{compNameEN}}
menu: {{compNameEN}}
menu: 组件
{{line_for_keep_metadata}}

import CodeBox from '../../doc-comps/happy-box';
Expand Down
2 changes: 1 addition & 1 deletion template/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface State {}
class {{compNameEN}} extends Component<Props, State> {
static propTypes = {};

static defaultProps: Partial<Props> = {};
static defaultProps = {};

constructor(props: Props) {
super(props);
Expand Down

0 comments on commit 2bde2f8

Please sign in to comment.