Skip to content

Commit 1325490

Browse files
committed
refactor: flatten the packages
1 parent 85dffca commit 1325490

137 files changed

Lines changed: 119 additions & 483 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module.exports = {
120120
'import/resolver': {
121121
typescript: {
122122
alwaysTryTypes: true,
123-
project: ['./packages/ava/tsconfig.json']
123+
project: ['./tsconfig.json']
124124
},
125125
},
126126
},

.fatherrc.ts

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,16 @@
1+
import path from 'path';
12
import { defineConfig } from 'father';
23

3-
export default (type, name, extendConfig = {}) => {
4-
const commonConfig = {
5-
esm: {
6-
output: 'esm',
7-
},
8-
cjs: {
9-
output: 'lib',
10-
},
11-
umd: {
12-
name,
13-
output: 'dist',
14-
},
15-
...extendConfig,
16-
};
17-
if (type === 'ts') {
18-
return defineConfig({
19-
umd: {
20-
name,
21-
output: 'dist',
22-
},
23-
...extendConfig,
24-
});
4+
export default defineConfig({
5+
umd: {
6+
name: 'AVA',
7+
output: 'dist',
8+
},
9+
alias: {
10+
'@ava': path.resolve(__dirname, 'src'),
11+
'@ava/advisor-deprecated': path.resolve(__dirname, 'src/advisor-deprecated'),
12+
'@advisor': path.resolve(__dirname, 'src/advisor'),
13+
'@advisor-deprecated': path.resolve(__dirname, 'src/advisor-deprecated'),
14+
'@ava/insight': path.resolve(__dirname, 'src/insight'),
2515
}
26-
if (type === 'react') {
27-
return defineConfig({
28-
...commonConfig,
29-
umd: {
30-
name,
31-
output: 'dist',
32-
externals: {
33-
antd: 'antd',
34-
react: 'react',
35-
'react-dom': 'ReactDom',
36-
},
37-
},
38-
});
39-
}
40-
return defineConfig(commonConfig);
41-
};
16+
});

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ packages/*/**/stats.html
6565

6666
# lock
6767
package-lock.json
68+
pnpm-lock.yaml
6869

6970
# test
7071
packages/torch/renderer/index.html

.markdownlint.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

.releaserc.js

Lines changed: 0 additions & 20 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)