forked from alibaba/hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.fatherrc.ts
64 lines (58 loc) · 1.42 KB
/
.fatherrc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { IBundleOptions } from 'father-build';
const zhConfig = {
dest: '.doc/zh-cn',
base: '/zh-cn',
files: './src/**/*_cn.{md,markdown,mdx}',
themeConfig: {
codemirrorTheme: 'docz-light',
menus: [
{ title: '发布日志', link: 'https://github.com/umijs/hooks/releases' },
{ title: 'Github', link: 'https://github.com/umijs/hooks' },
],
},
}
const enConfig = {
dest: '.doc',
base: '/',
files: './src/**/*_en.{md,markdown,mdx}',
themeConfig: {
codemirrorTheme: 'docz-light',
menus: [
{ title: 'Changelog', link: 'https://github.com/umijs/hooks/releases' },
{ title: 'Github', link: 'https://github.com/umijs/hooks' },
],
},
}
const config = process.env.LAN === 'zh-CN' ? zhConfig : enConfig;
const options: IBundleOptions = {
entry: 'src/index.ts',
esm: 'babel',
cjs: 'babel',
umd: {
name: 'umijsHooks',
globals: {
'react': 'React',
}
},
disableTypeCheck: true,
preCommit: {
eslint: true,
prettier: true,
},
doc: {
title: '@umijs/hooks',
repository: 'https://github.com/umijs/hooks',
theme: 'docz-theme-umi-hooks',
ignore: ['readme.md', 'changelog.md', 'readme_zh-CN.md', 'contributing.md', 'license.md', '__template__/*.mdx'],
...config,
},
extraBabelPlugins: [[
'babel-plugin-import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
},
]],
};
export default options;