-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
53 lines (48 loc) · 1.18 KB
/
config.js
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
const path = require('path');
const resolveLanguage = {
javascript: 'javascript',
js: 'javascript',
'--js': 'javascript',
'--jsx': 'javascript',
'--javascript': 'javascript',
// ts paths
tsx: 'typescript',
ts: 'typescript',
typescript: 'typescript',
'--typescript': 'typescript',
'--ts': 'typescript',
'--tsx': 'typescript'
};
const resolveTemplate = {
vitejs: 'vitejs',
Vitejs: 'vitejs',
Vite: 'vitejs',
vite: 'vitejs',
nextjs: 'nextjs',
Nextjs: 'nextjs',
next: 'nextjs',
Next: 'nextjs',
cra: 'cra',
'create-react-app': 'cra'
};
const resolveStyledLib = {
'styled-components': 'styled-components',
styled: 'styled-components',
'--styled': 'styled-components',
sc: 'styled-components',
'--sc': 'styled-components',
'--styled-components': 'styled-components',
stitches: 'stitches',
'--stitches': 'stitches'
};
const removeComponents = {
'nextjs': (clientPath) => [path.join(clientPath, 'src', 'components', 'Atoms', 'PrivateRoute'), path.join(clientPath, 'src', 'components', 'Atoms', 'PublicRoute')],
'vitejs': () => [],
'cra': () => [],
}
module.exports = {
resolveTemplate,
resolveLanguage,
resolveStyledLib,
removeComponents
};