Skip to content

Commit

Permalink
feat: ignore md files and demos (umijs#212)
Browse files Browse the repository at this point in the history
* feat: ignore md files and demos

* doc: update docs

Co-authored-by: 兼续 <chenglin.mcl@alipay.com>
  • Loading branch information
rdmclin2 and 兼续 authored Apr 20, 2020
1 parent 0b672d5 commit 5e495a3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,9 @@ export default {
babel 模式下一些文件不会被编译到 es 和 lib 下,包含:
* `__test__` 目录
* `fixtures` 目录
* `demos` 目录
* `mdx` 文件
* `md` 文件
* 测试文件,比如 `test.js``spec.js``e2e.js`,后缀还支持 `jsx``ts``tsx`

## 环境变量
Expand Down
2 changes: 2 additions & 0 deletions packages/father-build/src/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ export default async function(opts: IBabelOpts) {
const patterns = [
join(srcPath, '**/*'),
`!${join(srcPath, '**/fixtures{,/**}')}`,
`!${join(srcPath, '**/demos{,/**}')}`,
`!${join(srcPath, '**/__test__{,/**}')}`,
`!${join(srcPath, '**/*.mdx')}`,
`!${join(srcPath, '**/*.md')}`,
`!${join(srcPath, '**/*.+(test|e2e|spec).+(js|jsx|ts|tsx)')}`,
];
createStream(patterns).on('end', () => {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

export default function () {
return 'foo';
}

0 comments on commit 5e495a3

Please sign in to comment.