create-wordpress-theme-ts 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +60 -8
- package/package.json +1 -1
- package/template/.env +0 -0
- package/template/eslint.config.js +71 -0
- package/template/package-lock.json +6058 -6323
- package/template/package.json +45 -48
- package/template/public/assets/icons/favicon.ico +0 -0
- package/template/public/index.html +26 -0
- package/template/public/style.css +6 -43
- package/template/src/App.tsx +19 -19
- package/template/src/components/Layout.tsx +88 -88
- package/template/src/index.tsx +15 -15
- package/template/src/pages/About.tsx +65 -66
- package/template/src/pages/Home.tsx +135 -133
- package/template/src/pages/NotFound.tsx +55 -57
- package/template/src/styles/global.css +90 -90
- package/template/tsconfig.json +39 -20
- package/template/vite-env.d.ts +1 -0
- package/template/vite.config.ts +67 -109
- package/template/.eslintignore +0 -2
- package/template/.eslintrc.json +0 -34
- package/template/src/vite-env.d.ts +0 -7
|
@@ -1,133 +1,135 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
-
import { faRocket, faCode, faGlobe } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
-
|
|
5
|
-
const Container = styled.div`
|
|
6
|
-
max-width: 1200px;
|
|
7
|
-
margin: 0 auto;
|
|
8
|
-
padding: 4rem 2rem;
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
const Hero = styled.section`
|
|
12
|
-
text-align: center;
|
|
13
|
-
padding: 4rem 0;
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
const Title = styled.h1`
|
|
17
|
-
font-size: 3rem;
|
|
18
|
-
color: #1a1a2e;
|
|
19
|
-
margin-bottom: 1rem;
|
|
20
|
-
|
|
21
|
-
@media (max-width: 768px) {
|
|
22
|
-
font-size: 2rem;
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
const Subtitle = styled.p`
|
|
27
|
-
font-size: 1.25rem;
|
|
28
|
-
color: #666;
|
|
29
|
-
max-width: 600px;
|
|
30
|
-
margin: 0 auto 2rem;
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
const FeatureGrid = styled.div`
|
|
34
|
-
display: grid;
|
|
35
|
-
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
36
|
-
gap: 2rem;
|
|
37
|
-
margin-top: 4rem;
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
const FeatureCard = styled.div`
|
|
41
|
-
background: white;
|
|
42
|
-
border-radius: 12px;
|
|
43
|
-
padding: 2rem;
|
|
44
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
45
|
-
text-align: center;
|
|
46
|
-
transition:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
+
import { faRocket, faCode, faGlobe } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
|
|
5
|
+
const Container = styled.div`
|
|
6
|
+
max-width: 1200px;
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
padding: 4rem 2rem;
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
const Hero = styled.section`
|
|
12
|
+
text-align: center;
|
|
13
|
+
padding: 4rem 0;
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
const Title = styled.h1`
|
|
17
|
+
font-size: 3rem;
|
|
18
|
+
color: #1a1a2e;
|
|
19
|
+
margin-bottom: 1rem;
|
|
20
|
+
|
|
21
|
+
@media (max-width: 768px) {
|
|
22
|
+
font-size: 2rem;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
const Subtitle = styled.p`
|
|
27
|
+
font-size: 1.25rem;
|
|
28
|
+
color: #666;
|
|
29
|
+
max-width: 600px;
|
|
30
|
+
margin: 0 auto 2rem;
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const FeatureGrid = styled.div`
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
36
|
+
gap: 2rem;
|
|
37
|
+
margin-top: 4rem;
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
const FeatureCard = styled.div`
|
|
41
|
+
background: white;
|
|
42
|
+
border-radius: 12px;
|
|
43
|
+
padding: 2rem;
|
|
44
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
45
|
+
text-align: center;
|
|
46
|
+
transition:
|
|
47
|
+
transform 0.2s ease,
|
|
48
|
+
box-shadow 0.2s ease;
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
transform: translateY(-4px);
|
|
52
|
+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
const IconWrapper = styled.div`
|
|
57
|
+
font-size: 2.5rem;
|
|
58
|
+
color: #4a9eff;
|
|
59
|
+
margin-bottom: 1rem;
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
const FeatureTitle = styled.h3`
|
|
63
|
+
font-size: 1.25rem;
|
|
64
|
+
color: #1a1a2e;
|
|
65
|
+
margin-bottom: 0.75rem;
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
const FeatureDescription = styled.p`
|
|
69
|
+
color: #666;
|
|
70
|
+
line-height: 1.6;
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
const CTAButton = styled.a`
|
|
74
|
+
display: inline-block;
|
|
75
|
+
background: #4a9eff;
|
|
76
|
+
color: white;
|
|
77
|
+
padding: 1rem 2rem;
|
|
78
|
+
border-radius: 8px;
|
|
79
|
+
text-decoration: none;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
transition: background 0.2s ease;
|
|
82
|
+
|
|
83
|
+
&:hover {
|
|
84
|
+
background: #3a8eef;
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
|
|
88
|
+
function Home() {
|
|
89
|
+
return (
|
|
90
|
+
<Container>
|
|
91
|
+
<Hero>
|
|
92
|
+
<Title>Welcome to Your New Site</Title>
|
|
93
|
+
<Subtitle>
|
|
94
|
+
A modern WordPress theme powered by React, TypeScript, and Vite. Fast, flexible, and ready
|
|
95
|
+
for customization.
|
|
96
|
+
</Subtitle>
|
|
97
|
+
<CTAButton href="#features">Explore Features</CTAButton>
|
|
98
|
+
</Hero>
|
|
99
|
+
|
|
100
|
+
<FeatureGrid id="features">
|
|
101
|
+
<FeatureCard>
|
|
102
|
+
<IconWrapper>
|
|
103
|
+
<FontAwesomeIcon icon={faRocket} />
|
|
104
|
+
</IconWrapper>
|
|
105
|
+
<FeatureTitle>Lightning Fast</FeatureTitle>
|
|
106
|
+
<FeatureDescription>
|
|
107
|
+
Built with Vite for instant hot module replacement and optimized production builds.
|
|
108
|
+
</FeatureDescription>
|
|
109
|
+
</FeatureCard>
|
|
110
|
+
|
|
111
|
+
<FeatureCard>
|
|
112
|
+
<IconWrapper>
|
|
113
|
+
<FontAwesomeIcon icon={faCode} />
|
|
114
|
+
</IconWrapper>
|
|
115
|
+
<FeatureTitle>Modern Stack</FeatureTitle>
|
|
116
|
+
<FeatureDescription>
|
|
117
|
+
React 18, TypeScript, and styled-components for a great developer experience.
|
|
118
|
+
</FeatureDescription>
|
|
119
|
+
</FeatureCard>
|
|
120
|
+
|
|
121
|
+
<FeatureCard>
|
|
122
|
+
<IconWrapper>
|
|
123
|
+
<FontAwesomeIcon icon={faGlobe} />
|
|
124
|
+
</IconWrapper>
|
|
125
|
+
<FeatureTitle>WordPress Ready</FeatureTitle>
|
|
126
|
+
<FeatureDescription>
|
|
127
|
+
Builds directly to a WordPress theme zip file ready for deployment.
|
|
128
|
+
</FeatureDescription>
|
|
129
|
+
</FeatureCard>
|
|
130
|
+
</FeatureGrid>
|
|
131
|
+
</Container>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export default Home;
|
|
@@ -1,57 +1,55 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
const Container = styled.div`
|
|
5
|
-
max-width: 600px;
|
|
6
|
-
margin: 0 auto;
|
|
7
|
-
padding: 8rem 2rem;
|
|
8
|
-
text-align: center;
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
const ErrorCode = styled.h1`
|
|
12
|
-
font-size: 8rem;
|
|
13
|
-
color: #1a1a2e;
|
|
14
|
-
margin-bottom: 0;
|
|
15
|
-
line-height: 1;
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
const Title = styled.h2`
|
|
19
|
-
font-size: 1.5rem;
|
|
20
|
-
color: #666;
|
|
21
|
-
margin-bottom: 1.5rem;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
const Description = styled.p`
|
|
25
|
-
color: #888;
|
|
26
|
-
margin-bottom: 2rem;
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
const HomeLink = styled(Link)`
|
|
30
|
-
display: inline-block;
|
|
31
|
-
background: #4a9eff;
|
|
32
|
-
color: white;
|
|
33
|
-
padding: 0.75rem 1.5rem;
|
|
34
|
-
border-radius: 8px;
|
|
35
|
-
text-decoration: none;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
transition: background 0.2s ease;
|
|
38
|
-
|
|
39
|
-
&:hover {
|
|
40
|
-
background: #3a8eef;
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
|
|
44
|
-
function NotFound() {
|
|
45
|
-
return (
|
|
46
|
-
<Container>
|
|
47
|
-
<ErrorCode>404</ErrorCode>
|
|
48
|
-
<Title>Page Not Found</Title>
|
|
49
|
-
<Description>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export default NotFound;
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Link } from 'react-router-dom';
|
|
3
|
+
|
|
4
|
+
const Container = styled.div`
|
|
5
|
+
max-width: 600px;
|
|
6
|
+
margin: 0 auto;
|
|
7
|
+
padding: 8rem 2rem;
|
|
8
|
+
text-align: center;
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
const ErrorCode = styled.h1`
|
|
12
|
+
font-size: 8rem;
|
|
13
|
+
color: #1a1a2e;
|
|
14
|
+
margin-bottom: 0;
|
|
15
|
+
line-height: 1;
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
const Title = styled.h2`
|
|
19
|
+
font-size: 1.5rem;
|
|
20
|
+
color: #666;
|
|
21
|
+
margin-bottom: 1.5rem;
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
const Description = styled.p`
|
|
25
|
+
color: #888;
|
|
26
|
+
margin-bottom: 2rem;
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
const HomeLink = styled(Link)`
|
|
30
|
+
display: inline-block;
|
|
31
|
+
background: #4a9eff;
|
|
32
|
+
color: white;
|
|
33
|
+
padding: 0.75rem 1.5rem;
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
transition: background 0.2s ease;
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
background: #3a8eef;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
function NotFound() {
|
|
45
|
+
return (
|
|
46
|
+
<Container>
|
|
47
|
+
<ErrorCode>404</ErrorCode>
|
|
48
|
+
<Title>Page Not Found</Title>
|
|
49
|
+
<Description>Sorry, we couldn't find the page you're looking for.</Description>
|
|
50
|
+
<HomeLink to="/">Go Home</HomeLink>
|
|
51
|
+
</Container>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default NotFound;
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
/* Global Styles */
|
|
2
|
-
|
|
3
|
-
*,
|
|
4
|
-
*::before,
|
|
5
|
-
*::after {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
* {
|
|
10
|
-
margin: 0;
|
|
11
|
-
padding: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
html {
|
|
15
|
-
font-size: 16px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
html,
|
|
19
|
-
body {
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
body {
|
|
24
|
-
font-family:
|
|
25
|
-
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
26
|
-
'Helvetica Neue', sans-serif;
|
|
27
|
-
line-height: 1.5;
|
|
28
|
-
-webkit-font-smoothing: antialiased;
|
|
29
|
-
-moz-osx-font-smoothing: grayscale;
|
|
30
|
-
background-color: #f5f5f5;
|
|
31
|
-
color: #333;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
img,
|
|
35
|
-
picture,
|
|
36
|
-
video,
|
|
37
|
-
canvas,
|
|
38
|
-
svg {
|
|
39
|
-
display: block;
|
|
40
|
-
max-width: 100%;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
input,
|
|
44
|
-
button,
|
|
45
|
-
textarea,
|
|
46
|
-
select {
|
|
47
|
-
font: inherit;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
p,
|
|
51
|
-
h1,
|
|
52
|
-
h2,
|
|
53
|
-
h3,
|
|
54
|
-
h4,
|
|
55
|
-
h5,
|
|
56
|
-
h6 {
|
|
57
|
-
overflow-wrap: break-word;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
a {
|
|
61
|
-
color: inherit;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
#root {
|
|
65
|
-
isolation: isolate;
|
|
66
|
-
min-height: 100vh;
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* Utility Classes */
|
|
72
|
-
.visually-hidden {
|
|
73
|
-
position: absolute;
|
|
74
|
-
width: 1px;
|
|
75
|
-
height: 1px;
|
|
76
|
-
padding: 0;
|
|
77
|
-
margin: -1px;
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
clip: rect(0, 0, 0, 0);
|
|
80
|
-
white-space: nowrap;
|
|
81
|
-
border: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
code {
|
|
85
|
-
font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
|
|
86
|
-
background-color: #e9e9e9;
|
|
87
|
-
padding: 0.2em 0.4em;
|
|
88
|
-
border-radius: 4px;
|
|
89
|
-
font-size: 0.9em;
|
|
90
|
-
}
|
|
1
|
+
/* Global Styles */
|
|
2
|
+
|
|
3
|
+
*,
|
|
4
|
+
*::before,
|
|
5
|
+
*::after {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
* {
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html {
|
|
15
|
+
font-size: 16px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
html,
|
|
19
|
+
body {
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
body {
|
|
24
|
+
font-family:
|
|
25
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
26
|
+
'Helvetica Neue', sans-serif;
|
|
27
|
+
line-height: 1.5;
|
|
28
|
+
-webkit-font-smoothing: antialiased;
|
|
29
|
+
-moz-osx-font-smoothing: grayscale;
|
|
30
|
+
background-color: #f5f5f5;
|
|
31
|
+
color: #333;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
img,
|
|
35
|
+
picture,
|
|
36
|
+
video,
|
|
37
|
+
canvas,
|
|
38
|
+
svg {
|
|
39
|
+
display: block;
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
input,
|
|
44
|
+
button,
|
|
45
|
+
textarea,
|
|
46
|
+
select {
|
|
47
|
+
font: inherit;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
p,
|
|
51
|
+
h1,
|
|
52
|
+
h2,
|
|
53
|
+
h3,
|
|
54
|
+
h4,
|
|
55
|
+
h5,
|
|
56
|
+
h6 {
|
|
57
|
+
overflow-wrap: break-word;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
a {
|
|
61
|
+
color: inherit;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#root {
|
|
65
|
+
isolation: isolate;
|
|
66
|
+
min-height: 100vh;
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Utility Classes */
|
|
72
|
+
.visually-hidden {
|
|
73
|
+
position: absolute;
|
|
74
|
+
width: 1px;
|
|
75
|
+
height: 1px;
|
|
76
|
+
padding: 0;
|
|
77
|
+
margin: -1px;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
clip: rect(0, 0, 0, 0);
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
border: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
code {
|
|
85
|
+
font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
|
|
86
|
+
background-color: #e9e9e9;
|
|
87
|
+
padding: 0.2em 0.4em;
|
|
88
|
+
border-radius: 4px;
|
|
89
|
+
font-size: 0.9em;
|
|
90
|
+
}
|
package/template/tsconfig.json
CHANGED
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// Determines how modules are resolved. "bundler" is optimized for modern bundlers like Vite.
|
|
4
|
+
"moduleResolution": "bundler",
|
|
5
|
+
// Allows importing TypeScript files with their .ts extension explicitly.
|
|
6
|
+
"allowImportingTsExtensions": true,
|
|
7
|
+
// Do not emit output files (bundler handles this).
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
// Specifies the JSX factory function to use when targeting React JSX.
|
|
10
|
+
"jsx": "react-jsx",
|
|
11
|
+
// Specifies the target ECMAScript version.
|
|
12
|
+
"target": "es5",
|
|
13
|
+
// Specifies the module code generation.
|
|
14
|
+
"module": "esnext",
|
|
15
|
+
// Include Vite client types for import.meta.env
|
|
16
|
+
"types": ["vite/client"],
|
|
17
|
+
// Specifies the library files to be included in the compilation.
|
|
18
|
+
"lib": [
|
|
19
|
+
"dom", // Include DOM library.
|
|
20
|
+
"dom.iterable", // Include DOM iterable library.
|
|
21
|
+
"esnext" // Include latest ECMAScript features.
|
|
22
|
+
],
|
|
23
|
+
// Allow JavaScript files to be compiled.
|
|
24
|
+
"allowJs": true,
|
|
25
|
+
// Skip type checking of declaration files.
|
|
26
|
+
"skipLibCheck": true,
|
|
27
|
+
// Enables interoperability between CommonJS and ES Modules.
|
|
28
|
+
"esModuleInterop": true,
|
|
29
|
+
// Allow default imports from modules with no default export.
|
|
30
|
+
"allowSyntheticDefaultImports": true,
|
|
31
|
+
// Enable all strict type-checking options.
|
|
32
|
+
"strict": true,
|
|
33
|
+
// Ensure consistent casing in file names.
|
|
34
|
+
"forceConsistentCasingInFileNames": true,
|
|
35
|
+
// Report errors for fallthrough cases in switch statements.
|
|
36
|
+
"noFallthroughCasesInSwitch": true
|
|
37
|
+
},
|
|
38
|
+
"include": ["src", "vite.config.ts", "vite-env.d.ts"]
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|