@undp/create-app 0.2.14 → 0.2.16
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/generateFiles/generatePackageJson.js +12 -30
- package/bin/generateFiles/generateViteConfig.js +2 -4
- package/bin/index.js +1 -1
- package/bin/promptUser.js +21 -2
- package/bin/templates/next/auth/biome.json +67 -0
- package/bin/templates/next/basic/biome.json +67 -0
- package/bin/templates/vite/basic/biome.json +67 -0
- package/bin/templates/vite/query/biome.json +67 -0
- package/bin/templates/vite/query/src/App.tsx +1 -1
- package/bin/templates/vite/query+router/biome.json +67 -0
- package/bin/templates/vite/query+router/src/App.tsx +1 -1
- package/bin/templates/vite/query+router/src/components/Header.tsx +1 -1
- package/bin/templates/vite/query+router/src/routes/queryDemo.tsx +5 -5
- package/bin/templates/vite/router/biome.json +67 -0
- package/bin/templates/vite/router/src/App.tsx +1 -1
- package/bin/templates/vite/router/src/routes/about.tsx +5 -5
- package/bin/templates/viteWithLanguage/basic/README.md +75 -0
- package/bin/templates/viteWithLanguage/basic/biome.json +67 -0
- package/bin/templates/viteWithLanguage/basic/index.html +13 -0
- package/bin/templates/viteWithLanguage/basic/public/favicon.ico +0 -0
- package/bin/templates/viteWithLanguage/basic/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/viteWithLanguage/basic/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/viteWithLanguage/basic/public/imgs/Zustand-logo.svg +266 -0
- package/bin/templates/viteWithLanguage/basic/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/viteWithLanguage/basic/src/App.tsx +95 -0
- package/bin/templates/viteWithLanguage/basic/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/viteWithLanguage/basic/src/i18n.ts +31 -0
- package/bin/templates/viteWithLanguage/basic/src/locales/en/common.json +6 -0
- package/bin/templates/viteWithLanguage/basic/src/locales/es/common.json +6 -0
- package/bin/templates/viteWithLanguage/basic/src/locales/fr/common.json +6 -0
- package/bin/templates/viteWithLanguage/basic/src/main.tsx +15 -0
- package/bin/templates/viteWithLanguage/basic/src/stores/counter.ts +23 -0
- package/bin/templates/viteWithLanguage/basic/src/styles/fonts.css +213 -0
- package/bin/templates/viteWithLanguage/basic/src/styles/style.css +3 -0
- package/bin/templates/viteWithLanguage/basic/src/vite-env.d.ts +1 -0
- package/bin/templates/viteWithLanguage/basic/tailwind.config.js +7 -0
- package/bin/templates/viteWithLanguage/basic/tsconfig.json +29 -0
- package/bin/templates/viteWithLanguage/basic/tsconfig.node.json +9 -0
- package/bin/templates/viteWithLanguage/basic/vite.config.ts +58 -0
- package/bin/templates/viteWithLanguage/query/README.md +80 -0
- package/bin/templates/viteWithLanguage/query/biome.json +67 -0
- package/bin/templates/viteWithLanguage/query/index.html +13 -0
- package/bin/templates/viteWithLanguage/query/public/favicon.ico +0 -0
- package/bin/templates/viteWithLanguage/query/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/viteWithLanguage/query/public/imgs/Tanstack-logo.png +0 -0
- package/bin/templates/viteWithLanguage/query/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/viteWithLanguage/query/public/imgs/Zustand-logo.svg +266 -0
- package/bin/templates/viteWithLanguage/query/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/viteWithLanguage/query/src/App.tsx +125 -0
- package/bin/templates/viteWithLanguage/query/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/viteWithLanguage/query/src/constants.ts +16 -0
- package/bin/templates/viteWithLanguage/query/src/i18n.ts +31 -0
- package/bin/templates/viteWithLanguage/query/src/integration/tanstack-query.tsx +28 -0
- package/bin/templates/viteWithLanguage/query/src/locales/en/common.json +8 -0
- package/bin/templates/viteWithLanguage/query/src/locales/es/common.json +8 -0
- package/bin/templates/viteWithLanguage/query/src/locales/fr/common.json +8 -0
- package/bin/templates/viteWithLanguage/query/src/main.tsx +24 -0
- package/bin/templates/viteWithLanguage/query/src/stores/counter.ts +23 -0
- package/bin/templates/viteWithLanguage/query/src/styles/fonts.css +213 -0
- package/bin/templates/viteWithLanguage/query/src/styles/style.css +3 -0
- package/bin/templates/viteWithLanguage/query/src/vite-env.d.ts +1 -0
- package/bin/templates/viteWithLanguage/query/tailwind.config.js +7 -0
- package/bin/templates/viteWithLanguage/query/tsconfig.json +29 -0
- package/bin/templates/viteWithLanguage/query/tsconfig.node.json +9 -0
- package/bin/templates/viteWithLanguage/query/vite.config.ts +58 -0
- package/bin/templates/viteWithLanguage/query+router/README.md +111 -0
- package/bin/templates/viteWithLanguage/query+router/biome.json +67 -0
- package/bin/templates/viteWithLanguage/query+router/index.html +13 -0
- package/bin/templates/viteWithLanguage/query+router/public/favicon.ico +0 -0
- package/bin/templates/viteWithLanguage/query+router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/viteWithLanguage/query+router/public/imgs/Tanstack-logo.png +0 -0
- package/bin/templates/viteWithLanguage/query+router/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/viteWithLanguage/query+router/public/imgs/Zustand-logo.svg +266 -0
- package/bin/templates/viteWithLanguage/query+router/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/viteWithLanguage/query+router/src/App.tsx +75 -0
- package/bin/templates/viteWithLanguage/query+router/src/Icons.tsx +74 -0
- package/bin/templates/viteWithLanguage/query+router/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/viteWithLanguage/query+router/src/components/Footer.tsx +16 -0
- package/bin/templates/viteWithLanguage/query+router/src/components/Header.tsx +70 -0
- package/bin/templates/viteWithLanguage/query+router/src/constants.ts +16 -0
- package/bin/templates/viteWithLanguage/query+router/src/i18n.ts +31 -0
- package/bin/templates/viteWithLanguage/query+router/src/integration/tanstack-query.tsx +28 -0
- package/bin/templates/viteWithLanguage/query+router/src/locales/en/common.json +13 -0
- package/bin/templates/viteWithLanguage/query+router/src/locales/es/common.json +13 -0
- package/bin/templates/viteWithLanguage/query+router/src/locales/fr/common.json +14 -0
- package/bin/templates/viteWithLanguage/query+router/src/main.tsx +95 -0
- package/bin/templates/viteWithLanguage/query+router/src/routes/queryDemo.tsx +78 -0
- package/bin/templates/viteWithLanguage/query+router/src/stores/counter.ts +23 -0
- package/bin/templates/viteWithLanguage/query+router/src/styles/fonts.css +213 -0
- package/bin/templates/viteWithLanguage/query+router/src/styles/style.css +3 -0
- package/bin/templates/viteWithLanguage/query+router/src/vite-env.d.ts +1 -0
- package/bin/templates/viteWithLanguage/query+router/tailwind.config.js +7 -0
- package/bin/templates/viteWithLanguage/query+router/tsconfig.json +29 -0
- package/bin/templates/viteWithLanguage/query+router/tsconfig.node.json +9 -0
- package/bin/templates/viteWithLanguage/query+router/vite.config.ts +58 -0
- package/bin/templates/viteWithLanguage/router/README.md +106 -0
- package/bin/templates/viteWithLanguage/router/biome.json +67 -0
- package/bin/templates/viteWithLanguage/router/index.html +13 -0
- package/bin/templates/viteWithLanguage/router/public/favicon.ico +0 -0
- package/bin/templates/viteWithLanguage/router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/viteWithLanguage/router/public/imgs/Tanstack-logo.png +0 -0
- package/bin/templates/viteWithLanguage/router/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/viteWithLanguage/router/public/imgs/Zustand-logo.svg +266 -0
- package/bin/templates/viteWithLanguage/router/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/viteWithLanguage/router/src/App.tsx +74 -0
- package/bin/templates/viteWithLanguage/router/src/Icons.tsx +74 -0
- package/bin/templates/viteWithLanguage/router/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/viteWithLanguage/router/src/components/Footer.tsx +16 -0
- package/bin/templates/viteWithLanguage/router/src/components/Header.tsx +70 -0
- package/bin/templates/viteWithLanguage/router/src/constants.ts +16 -0
- package/bin/templates/viteWithLanguage/router/src/i18n.ts +31 -0
- package/bin/templates/viteWithLanguage/router/src/locales/en/common.json +11 -0
- package/bin/templates/viteWithLanguage/router/src/locales/es/common.json +11 -0
- package/bin/templates/viteWithLanguage/router/src/locales/fr/common.json +11 -0
- package/bin/templates/viteWithLanguage/router/src/main.tsx +89 -0
- package/bin/templates/viteWithLanguage/router/src/routes/about.tsx +58 -0
- package/bin/templates/viteWithLanguage/router/src/stores/counter.ts +23 -0
- package/bin/templates/viteWithLanguage/router/src/styles/fonts.css +213 -0
- package/bin/templates/viteWithLanguage/router/src/styles/style.css +3 -0
- package/bin/templates/viteWithLanguage/router/src/vite-env.d.ts +1 -0
- package/bin/templates/viteWithLanguage/router/tailwind.config.js +7 -0
- package/bin/templates/viteWithLanguage/router/tsconfig.json +29 -0
- package/bin/templates/viteWithLanguage/router/tsconfig.node.json +9 -0
- package/bin/templates/viteWithLanguage/router/vite.config.ts +58 -0
- package/package.json +1 -1
- package/bin/templates/next/auth/.prettierrc +0 -10
- package/bin/templates/next/auth/eslint.config.mjs +0 -103
- package/bin/templates/next/basic/.prettierrc +0 -10
- package/bin/templates/next/basic/eslint.config.mjs +0 -103
- package/bin/templates/vite/basic/.prettierrc +0 -10
- package/bin/templates/vite/basic/eslint.config.mjs +0 -97
- package/bin/templates/vite/query/.prettierrc +0 -10
- package/bin/templates/vite/query/eslint.config.mjs +0 -97
- package/bin/templates/vite/query+router/.prettierrc +0 -10
- package/bin/templates/vite/query+router/eslint.config.mjs +0 -97
- package/bin/templates/vite/router/.prettierrc +0 -10
- package/bin/templates/vite/router/eslint.config.mjs +0 -97
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-display: swap;
|
|
3
|
+
font-family: 'ProximaNova';
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-weight: 100;
|
|
6
|
+
src: url('./fonts/proximanova-thin-webfont.woff2') format('woff2');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@font-face {
|
|
10
|
+
font-display: swap;
|
|
11
|
+
font-family: 'ProximaNova';
|
|
12
|
+
font-style: italic;
|
|
13
|
+
font-weight: 100;
|
|
14
|
+
src: url('./fonts/proximanova-thinit-webfont.woff2') format('woff2');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@font-face {
|
|
18
|
+
font-display: swap;
|
|
19
|
+
font-family: 'ProximaNova';
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 200;
|
|
22
|
+
src: url('./fonts/proximanova-light-webfont.woff2') format('woff2');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@font-face {
|
|
26
|
+
font-display: swap;
|
|
27
|
+
font-family: 'ProximaNova';
|
|
28
|
+
font-style: italic;
|
|
29
|
+
font-weight: 200 300;
|
|
30
|
+
src: url('./fonts/proximanova-lightit-webfont.woff2') format('woff2');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@font-face {
|
|
34
|
+
font-display: swap;
|
|
35
|
+
font-family: 'ProximaNova';
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-weight: 400;
|
|
38
|
+
src: url('./fonts/proximanova-regular-webfont.woff2') format('woff2');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@font-face {
|
|
42
|
+
font-display: swap;
|
|
43
|
+
font-family: 'ProximaNova';
|
|
44
|
+
font-style: italic;
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
src: url('./fonts/proximanova-regularit-webfont.woff2') format('woff2');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@font-face {
|
|
50
|
+
font-display: swap;
|
|
51
|
+
font-family: 'ProximaNova';
|
|
52
|
+
font-style: normal;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
src: url('./fonts/proximanova-medium-webfont.woff2') format('woff2');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@font-face {
|
|
58
|
+
font-display: swap;
|
|
59
|
+
font-family: 'ProximaNova';
|
|
60
|
+
font-style: italic;
|
|
61
|
+
font-weight: 500;
|
|
62
|
+
src: url('./fonts/proximanova-mediumit-webfont.woff2') format('woff2');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@font-face {
|
|
66
|
+
font-display: swap;
|
|
67
|
+
font-family: 'ProximaNova';
|
|
68
|
+
font-style: normal;
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
src: url('./fonts/proximanova-semibold-webfont-2.woff2') format('woff2');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@font-face {
|
|
74
|
+
font-display: swap;
|
|
75
|
+
font-family: 'ProximaNova';
|
|
76
|
+
font-style: italic;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
src: url('./fonts/proximanova-semiboldit-webfont-2.woff2') format('woff2');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@font-face {
|
|
82
|
+
font-display: swap;
|
|
83
|
+
font-family: 'ProximaNova';
|
|
84
|
+
font-style: normal;
|
|
85
|
+
font-weight: 700;
|
|
86
|
+
src: url('./fonts/proximanova-bold-webfont.woff2') format('woff2');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@font-face {
|
|
90
|
+
font-display: swap;
|
|
91
|
+
font-family: 'ProximaNova';
|
|
92
|
+
font-style: italic;
|
|
93
|
+
font-weight: 700;
|
|
94
|
+
src: url('./fonts/proximanova-boldit-webfont.woff2') format('woff2');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@font-face {
|
|
98
|
+
font-display: swap;
|
|
99
|
+
font-family: 'ProximaNova';
|
|
100
|
+
font-style: normal;
|
|
101
|
+
font-weight: 800;
|
|
102
|
+
src: url('./fonts/proximanova-extrabold-webfont.woff2') format('woff2');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@font-face {
|
|
106
|
+
font-display: swap;
|
|
107
|
+
font-family: 'ProximaNova';
|
|
108
|
+
font-style: italic;
|
|
109
|
+
font-weight: 800;
|
|
110
|
+
src: url('./fonts/proximanova-extraboldit-webfont.woff2') format('woff2');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@font-face {
|
|
114
|
+
font-display: swap;
|
|
115
|
+
font-family: 'ProximaNova';
|
|
116
|
+
font-style: normal;
|
|
117
|
+
font-weight: 900;
|
|
118
|
+
src: url('./fonts/proximanova-black-webfont.woff2') format('woff2');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@font-face {
|
|
122
|
+
font-display: swap;
|
|
123
|
+
font-family: 'ProximaNova';
|
|
124
|
+
font-style: italic;
|
|
125
|
+
font-weight: 900;
|
|
126
|
+
src: url('./fonts/proximanova-blackit-webfont.woff2') format('woff2');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* SohneBreit */
|
|
130
|
+
@font-face {
|
|
131
|
+
font-display: swap;
|
|
132
|
+
font-family: 'SohneBreit';
|
|
133
|
+
font-style: normal;
|
|
134
|
+
font-weight: 100 700;
|
|
135
|
+
src: url('./fonts/soehne-breit-web-dreiviertelfett.woff2') format('woff2');
|
|
136
|
+
unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F, U+2070-209F;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@font-face {
|
|
140
|
+
font-display: swap;
|
|
141
|
+
font-family: 'SohneBreit';
|
|
142
|
+
font-style: italic;
|
|
143
|
+
font-weight: 100 700;
|
|
144
|
+
src: url('./fonts/soehne-breit-web-dreiviertelfett-kursiv.woff2')
|
|
145
|
+
format('woff2');
|
|
146
|
+
unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F, U+2070-209F;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@font-face {
|
|
150
|
+
font-display: swap;
|
|
151
|
+
font-family: 'SohneBreit';
|
|
152
|
+
font-style: normal;
|
|
153
|
+
font-weight: 800 900;
|
|
154
|
+
src: url('./fonts/soehne-breit-web-fett.woff2') format('woff2');
|
|
155
|
+
unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F, U+2070-209F;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@font-face {
|
|
159
|
+
font-display: swap;
|
|
160
|
+
font-family: 'SohneBreit';
|
|
161
|
+
font-style: italic;
|
|
162
|
+
font-weight: 800 900;
|
|
163
|
+
src: url('./fonts/soehne-breit-web-fett-kursiv.woff2') format('woff2');
|
|
164
|
+
unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-20CF;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@font-face {
|
|
168
|
+
font-display: swap;
|
|
169
|
+
font-family: 'UNBangla';
|
|
170
|
+
font-style: normal;
|
|
171
|
+
font-weight: 100 300;
|
|
172
|
+
src: url('./fonts/UNBangla-Thin.woff2') format('woff2');
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@font-face {
|
|
176
|
+
font-display: swap;
|
|
177
|
+
font-family: 'UNBangla';
|
|
178
|
+
font-style: italic;
|
|
179
|
+
font-weight: 100 300;
|
|
180
|
+
src: url('./fonts/UNBangla-ThinItalic.woff2') format('woff2');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@font-face {
|
|
184
|
+
font-display: swap;
|
|
185
|
+
font-family: 'UNBangla';
|
|
186
|
+
font-style: normal;
|
|
187
|
+
font-weight: 400;
|
|
188
|
+
src: url('./fonts/UNBangla-Regular.woff2') format('woff2');
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@font-face {
|
|
192
|
+
font-display: swap;
|
|
193
|
+
font-family: 'UNBangla';
|
|
194
|
+
font-style: italic;
|
|
195
|
+
font-weight: 400;
|
|
196
|
+
src: url('./fonts/UNBangla-Italic.woff2') format('woff2');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@font-face {
|
|
200
|
+
font-display: swap;
|
|
201
|
+
font-family: 'UNBangla';
|
|
202
|
+
font-style: normal;
|
|
203
|
+
font-weight: 500 900;
|
|
204
|
+
src: url('./fonts/UNBangla-Bold.woff2') format('woff2');
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@font-face {
|
|
208
|
+
font-display: swap;
|
|
209
|
+
font-family: 'UNBangla';
|
|
210
|
+
font-style: italic;
|
|
211
|
+
font-weight: 500 900;
|
|
212
|
+
src: url('./fonts/UNBangla-BoldItalic.woff2') format('woff2');
|
|
213
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"allowImportingTsExtensions": true,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"declarationMap": true,
|
|
7
|
+
"useDefineForClassFields": true,
|
|
8
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
9
|
+
"allowJs": false,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"esModuleInterop": false,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"module": "ESNext",
|
|
16
|
+
"moduleResolution": "bundler",
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"noEmit": true,
|
|
20
|
+
"jsx": "react-jsx",
|
|
21
|
+
"baseUrl": ".",
|
|
22
|
+
"paths": {
|
|
23
|
+
"@/*": ["./src/*"]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [],
|
|
27
|
+
"include": ["eslint.config.mjs", "src", "tailwind.config.js"],
|
|
28
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
29
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'vite';
|
|
4
|
+
import react from '@vitejs/plugin-react';
|
|
5
|
+
import eslint from '@nabla/vite-plugin-eslint';
|
|
6
|
+
import { visualizer } from 'rollup-plugin-visualizer';
|
|
7
|
+
import postcssNested from 'postcss-nested';
|
|
8
|
+
import tailwindcss from '@tailwindcss/postcss';
|
|
9
|
+
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
10
|
+
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
plugins: [
|
|
13
|
+
react({
|
|
14
|
+
babel: {
|
|
15
|
+
plugins: ['babel-plugin-react-compiler'],
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
eslint(),
|
|
19
|
+
visualizer({ filename: 'stats.html', open: true }),
|
|
20
|
+
viteStaticCopy({
|
|
21
|
+
targets: [{ src: 'staticwebapp.config.json', dest: '' }],
|
|
22
|
+
}),
|
|
23
|
+
],
|
|
24
|
+
css: {
|
|
25
|
+
postcss: {
|
|
26
|
+
plugins: [
|
|
27
|
+
postcssNested(),
|
|
28
|
+
tailwindcss(),
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
build: {
|
|
33
|
+
manifest: true,
|
|
34
|
+
cssCodeSplit: false,
|
|
35
|
+
rollupOptions: {
|
|
36
|
+
output: {
|
|
37
|
+
manualChunks(id) {
|
|
38
|
+
if (id.includes('node_modules/react')) return 'react';
|
|
39
|
+
if (id.includes('@undp/design-system-react')) return 'undp';
|
|
40
|
+
if (id.includes('@undp/data-viz')) return 'undp';
|
|
41
|
+
},
|
|
42
|
+
chunkFileNames: '[name]-[hash].js',
|
|
43
|
+
assetFileNames: '[name].[ext]',
|
|
44
|
+
entryFileNames: '[name].js',
|
|
45
|
+
},
|
|
46
|
+
treeshake: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
server: {
|
|
50
|
+
cors: {
|
|
51
|
+
origin: '*',
|
|
52
|
+
methods: ['GET'],
|
|
53
|
+
preflightContinue: false,
|
|
54
|
+
optionsSuccessStatus: 204,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
resolve: { alias: { '@': path.resolve(__dirname, './src') } },
|
|
58
|
+
});
|
package/package.json
CHANGED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import nextVitals from 'eslint-config-next/core-web-vitals';
|
|
2
|
-
import nextTs from 'eslint-config-next/typescript';
|
|
3
|
-
import js from '@eslint/js';
|
|
4
|
-
import tseslint from 'typescript-eslint';
|
|
5
|
-
import pluginReact from 'eslint-plugin-react';
|
|
6
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
7
|
-
import importPlugin from 'eslint-plugin-import';
|
|
8
|
-
import { defineConfig } from 'eslint/config';
|
|
9
|
-
import prettierConfig from 'eslint-config-prettier';
|
|
10
|
-
import prettierPlugin from 'eslint-plugin-prettier';
|
|
11
|
-
|
|
12
|
-
export default defineConfig([
|
|
13
|
-
{
|
|
14
|
-
ignores: [
|
|
15
|
-
'node_modules/**',
|
|
16
|
-
'build/**',
|
|
17
|
-
'public/**',
|
|
18
|
-
'dist/**',
|
|
19
|
-
'storybook-static/**',
|
|
20
|
-
'dist-ssr/**',
|
|
21
|
-
'coverage/**',
|
|
22
|
-
'**/*.test.js',
|
|
23
|
-
'**/__snapshots__/**',
|
|
24
|
-
'.next/**',
|
|
25
|
-
'out/**',
|
|
26
|
-
'next-env.d.ts',
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
...nextVitals,
|
|
30
|
-
...nextTs,
|
|
31
|
-
js.configs.recommended,
|
|
32
|
-
reactHooks.configs.flat.recommended,
|
|
33
|
-
...tseslint.configs.recommended,
|
|
34
|
-
{
|
|
35
|
-
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx,ts}'],
|
|
36
|
-
plugins: {
|
|
37
|
-
react: pluginReact,
|
|
38
|
-
'react-hooks': reactHooks,
|
|
39
|
-
import: importPlugin,
|
|
40
|
-
prettier: prettierPlugin,
|
|
41
|
-
},
|
|
42
|
-
settings: {
|
|
43
|
-
react: {
|
|
44
|
-
version: 'detect',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
rules: {
|
|
48
|
-
// React rules
|
|
49
|
-
'react/self-closing-comp': ['error', { component: true, html: true }],
|
|
50
|
-
'react/react-in-jsx-scope': 'off',
|
|
51
|
-
'react/jsx-uses-react': 'off',
|
|
52
|
-
'react/jsx-uses-vars': 'warn',
|
|
53
|
-
'react/jsx-no-undef': 'error',
|
|
54
|
-
'react/jsx-curly-brace-presence': 'error',
|
|
55
|
-
'react/prop-types': 'off',
|
|
56
|
-
'react/require-default-props': 0,
|
|
57
|
-
'react/jsx-filename-extension': 0,
|
|
58
|
-
'react/no-array-index-key': 0,
|
|
59
|
-
'react/jsx-props-no-spreading': 0,
|
|
60
|
-
|
|
61
|
-
// TypeScript rules
|
|
62
|
-
'no-unused-vars': 'off',
|
|
63
|
-
'@typescript-eslint/no-unused-vars': [
|
|
64
|
-
'error',
|
|
65
|
-
{ argsIgnorePattern: '^_' },
|
|
66
|
-
],
|
|
67
|
-
'@typescript-eslint/no-explicit-any': 'warn',
|
|
68
|
-
|
|
69
|
-
// Import rules
|
|
70
|
-
'import/order': [
|
|
71
|
-
'warn',
|
|
72
|
-
{
|
|
73
|
-
groups: [
|
|
74
|
-
'builtin',
|
|
75
|
-
'external',
|
|
76
|
-
'internal',
|
|
77
|
-
'parent',
|
|
78
|
-
'sibling',
|
|
79
|
-
'index',
|
|
80
|
-
],
|
|
81
|
-
'newlines-between': 'always',
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
'import/no-unresolved': 0,
|
|
85
|
-
'import/no-extraneous-dependencies': ['warn', { devDependencies: true }],
|
|
86
|
-
'import/extensions': 0,
|
|
87
|
-
'import/prefer-default-export': 0,
|
|
88
|
-
'import/no-anonymous-default-export': 0,
|
|
89
|
-
|
|
90
|
-
// A11y rules
|
|
91
|
-
'jsx-a11y/alt-text': 'warn',
|
|
92
|
-
'jsx-a11y/anchor-is-valid': 'warn',
|
|
93
|
-
|
|
94
|
-
// General rules
|
|
95
|
-
'prefer-const': 'error',
|
|
96
|
-
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
97
|
-
'no-debugger': 'warn',
|
|
98
|
-
'no-nested-ternary': 0,
|
|
99
|
-
'prettier/prettier': 'error',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
prettierConfig,
|
|
103
|
-
]);
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import nextVitals from 'eslint-config-next/core-web-vitals';
|
|
2
|
-
import nextTs from 'eslint-config-next/typescript';
|
|
3
|
-
import js from '@eslint/js';
|
|
4
|
-
import tseslint from 'typescript-eslint';
|
|
5
|
-
import pluginReact from 'eslint-plugin-react';
|
|
6
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
7
|
-
import importPlugin from 'eslint-plugin-import';
|
|
8
|
-
import { defineConfig } from 'eslint/config';
|
|
9
|
-
import prettierConfig from 'eslint-config-prettier';
|
|
10
|
-
import prettierPlugin from 'eslint-plugin-prettier';
|
|
11
|
-
|
|
12
|
-
export default defineConfig([
|
|
13
|
-
{
|
|
14
|
-
ignores: [
|
|
15
|
-
'node_modules/**',
|
|
16
|
-
'build/**',
|
|
17
|
-
'public/**',
|
|
18
|
-
'dist/**',
|
|
19
|
-
'storybook-static/**',
|
|
20
|
-
'dist-ssr/**',
|
|
21
|
-
'coverage/**',
|
|
22
|
-
'**/*.test.js',
|
|
23
|
-
'**/__snapshots__/**',
|
|
24
|
-
'.next/**',
|
|
25
|
-
'out/**',
|
|
26
|
-
'next-env.d.ts',
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
...nextVitals,
|
|
30
|
-
...nextTs,
|
|
31
|
-
js.configs.recommended,
|
|
32
|
-
reactHooks.configs.flat.recommended,
|
|
33
|
-
...tseslint.configs.recommended,
|
|
34
|
-
{
|
|
35
|
-
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx,ts}'],
|
|
36
|
-
plugins: {
|
|
37
|
-
react: pluginReact,
|
|
38
|
-
'react-hooks': reactHooks,
|
|
39
|
-
import: importPlugin,
|
|
40
|
-
prettier: prettierPlugin,
|
|
41
|
-
},
|
|
42
|
-
settings: {
|
|
43
|
-
react: {
|
|
44
|
-
version: 'detect',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
rules: {
|
|
48
|
-
// React rules
|
|
49
|
-
'react/self-closing-comp': ['error', { component: true, html: true }],
|
|
50
|
-
'react/react-in-jsx-scope': 'off',
|
|
51
|
-
'react/jsx-uses-react': 'off',
|
|
52
|
-
'react/jsx-uses-vars': 'warn',
|
|
53
|
-
'react/jsx-no-undef': 'error',
|
|
54
|
-
'react/jsx-curly-brace-presence': 'error',
|
|
55
|
-
'react/prop-types': 'off',
|
|
56
|
-
'react/require-default-props': 0,
|
|
57
|
-
'react/jsx-filename-extension': 0,
|
|
58
|
-
'react/no-array-index-key': 0,
|
|
59
|
-
'react/jsx-props-no-spreading': 0,
|
|
60
|
-
|
|
61
|
-
// TypeScript rules
|
|
62
|
-
'no-unused-vars': 'off',
|
|
63
|
-
'@typescript-eslint/no-unused-vars': [
|
|
64
|
-
'error',
|
|
65
|
-
{ argsIgnorePattern: '^_' },
|
|
66
|
-
],
|
|
67
|
-
'@typescript-eslint/no-explicit-any': 'warn',
|
|
68
|
-
|
|
69
|
-
// Import rules
|
|
70
|
-
'import/order': [
|
|
71
|
-
'warn',
|
|
72
|
-
{
|
|
73
|
-
groups: [
|
|
74
|
-
'builtin',
|
|
75
|
-
'external',
|
|
76
|
-
'internal',
|
|
77
|
-
'parent',
|
|
78
|
-
'sibling',
|
|
79
|
-
'index',
|
|
80
|
-
],
|
|
81
|
-
'newlines-between': 'always',
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
'import/no-unresolved': 0,
|
|
85
|
-
'import/no-extraneous-dependencies': ['warn', { devDependencies: true }],
|
|
86
|
-
'import/extensions': 0,
|
|
87
|
-
'import/prefer-default-export': 0,
|
|
88
|
-
'import/no-anonymous-default-export': 0,
|
|
89
|
-
|
|
90
|
-
// A11y rules
|
|
91
|
-
'jsx-a11y/alt-text': 'warn',
|
|
92
|
-
'jsx-a11y/anchor-is-valid': 'warn',
|
|
93
|
-
|
|
94
|
-
// General rules
|
|
95
|
-
'prefer-const': 'error',
|
|
96
|
-
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
97
|
-
'no-debugger': 'warn',
|
|
98
|
-
'no-nested-ternary': 0,
|
|
99
|
-
'prettier/prettier': 'error',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
prettierConfig,
|
|
103
|
-
]);
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
|
-
import tseslint from 'typescript-eslint';
|
|
3
|
-
import pluginReact from 'eslint-plugin-react';
|
|
4
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
5
|
-
import importPlugin from 'eslint-plugin-import';
|
|
6
|
-
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
7
|
-
import { defineConfig } from 'eslint/config';
|
|
8
|
-
import prettierConfig from 'eslint-config-prettier';
|
|
9
|
-
import prettierPlugin from 'eslint-plugin-prettier';
|
|
10
|
-
|
|
11
|
-
export default defineConfig([
|
|
12
|
-
{
|
|
13
|
-
ignores: [
|
|
14
|
-
'node_modules/**',
|
|
15
|
-
'build/**',
|
|
16
|
-
'public/**',
|
|
17
|
-
'dist/**',
|
|
18
|
-
'storybook-static/**',
|
|
19
|
-
'dist-ssr/**',
|
|
20
|
-
'coverage/**',
|
|
21
|
-
'**/*.test.js',
|
|
22
|
-
'**/__snapshots__/**',
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
js.configs.recommended,
|
|
26
|
-
reactHooks.configs.flat.recommended,
|
|
27
|
-
...tseslint.configs.recommended,
|
|
28
|
-
{
|
|
29
|
-
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx,ts}'],
|
|
30
|
-
plugins: {
|
|
31
|
-
react: pluginReact,
|
|
32
|
-
'react-hooks': reactHooks,
|
|
33
|
-
import: importPlugin,
|
|
34
|
-
'jsx-a11y': jsxA11y,
|
|
35
|
-
prettier: prettierPlugin,
|
|
36
|
-
},
|
|
37
|
-
settings: {
|
|
38
|
-
react: {
|
|
39
|
-
version: 'detect',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
rules: {
|
|
43
|
-
// React rules
|
|
44
|
-
'react/self-closing-comp': ['error', { component: true, html: true }],
|
|
45
|
-
'react/react-in-jsx-scope': 'off',
|
|
46
|
-
'react/jsx-uses-react': 'off',
|
|
47
|
-
'react/jsx-uses-vars': 'warn',
|
|
48
|
-
'react/jsx-no-undef': 'error',
|
|
49
|
-
'react/jsx-curly-brace-presence': 'error',
|
|
50
|
-
'react/prop-types': 'off',
|
|
51
|
-
'react/require-default-props': 0,
|
|
52
|
-
'react/jsx-filename-extension': 0,
|
|
53
|
-
'react/no-array-index-key': 0,
|
|
54
|
-
'react/jsx-props-no-spreading': 0,
|
|
55
|
-
|
|
56
|
-
// TypeScript rules
|
|
57
|
-
'no-unused-vars': 'off',
|
|
58
|
-
'@typescript-eslint/no-unused-vars': [
|
|
59
|
-
'error',
|
|
60
|
-
{ argsIgnorePattern: '^_' },
|
|
61
|
-
],
|
|
62
|
-
'@typescript-eslint/no-explicit-any': 'warn',
|
|
63
|
-
|
|
64
|
-
// Import rules
|
|
65
|
-
'import/order': [
|
|
66
|
-
'warn',
|
|
67
|
-
{
|
|
68
|
-
groups: [
|
|
69
|
-
'builtin',
|
|
70
|
-
'external',
|
|
71
|
-
'internal',
|
|
72
|
-
'parent',
|
|
73
|
-
'sibling',
|
|
74
|
-
'index',
|
|
75
|
-
],
|
|
76
|
-
'newlines-between': 'always',
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
'import/no-unresolved': 0,
|
|
80
|
-
'import/no-extraneous-dependencies': ['warn', { devDependencies: true }],
|
|
81
|
-
'import/extensions': 0,
|
|
82
|
-
'import/prefer-default-export': 0,
|
|
83
|
-
|
|
84
|
-
// A11y rules
|
|
85
|
-
'jsx-a11y/alt-text': 'warn',
|
|
86
|
-
'jsx-a11y/anchor-is-valid': 'warn',
|
|
87
|
-
|
|
88
|
-
// General rules
|
|
89
|
-
'prefer-const': 'error',
|
|
90
|
-
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
91
|
-
'no-debugger': 'warn',
|
|
92
|
-
'no-nested-ternary': 0,
|
|
93
|
-
'prettier/prettier': 'error',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
prettierConfig,
|
|
97
|
-
]);
|