@undp/create-app 0.2.15 → 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/generateViteConfig.js +0 -2
- package/bin/templates/vite/query/src/App.tsx +1 -1
- 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/router/src/App.tsx +1 -1
- package/bin/templates/viteWithLanguage/basic/src/App.tsx +1 -1
- package/bin/templates/viteWithLanguage/basic/src/locales/en/common.json +1 -1
- package/bin/templates/viteWithLanguage/basic/src/locales/es/common.json +1 -1
- package/bin/templates/viteWithLanguage/basic/src/locales/fr/common.json +1 -1
- package/bin/templates/viteWithLanguage/query/src/App.tsx +1 -1
- package/bin/templates/viteWithLanguage/query/src/locales/en/common.json +1 -1
- package/bin/templates/viteWithLanguage/query/src/locales/es/common.json +1 -1
- package/bin/templates/viteWithLanguage/query/src/locales/fr/common.json +1 -1
- package/bin/templates/viteWithLanguage/query+router/src/App.tsx +2 -2
- package/bin/templates/viteWithLanguage/query+router/src/locales/en/common.json +1 -1
- package/bin/templates/viteWithLanguage/query+router/src/locales/es/common.json +1 -1
- package/bin/templates/viteWithLanguage/query+router/src/locales/fr/common.json +1 -1
- package/bin/templates/viteWithLanguage/query+router/src/routes/queryDemo.tsx +1 -1
- package/bin/templates/viteWithLanguage/router/src/App.tsx +2 -2
- package/bin/templates/viteWithLanguage/router/src/locales/en/common.json +1 -1
- package/bin/templates/viteWithLanguage/router/src/locales/es/common.json +1 -1
- package/bin/templates/viteWithLanguage/router/src/locales/fr/common.json +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ export function generateViteConfig(config) {
|
|
|
2
2
|
return `import path from 'path';
|
|
3
3
|
import { defineConfig } from 'vite';
|
|
4
4
|
import react from '@vitejs/plugin-react';
|
|
5
|
-
import eslint from '@nabla/vite-plugin-eslint';
|
|
6
5
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
7
6
|
import postcssNested from 'postcss-nested';
|
|
8
7
|
import tailwindcss from '@tailwindcss/postcss';${config.addStaticWebAppConfig ? `
|
|
@@ -16,7 +15,6 @@ export default defineConfig({
|
|
|
16
15
|
plugins: ['babel-plugin-react-compiler'],
|
|
17
16
|
},
|
|
18
17
|
}),
|
|
19
|
-
eslint(),
|
|
20
18
|
visualizer({ filename: 'stats.html', open: true }),${config.addStaticWebAppConfig ? `
|
|
21
19
|
viteStaticCopy({
|
|
22
20
|
targets: [{ src: 'staticwebapp.config.json', dest: '' }],
|
|
@@ -68,7 +68,7 @@ function App() {
|
|
|
68
68
|
/>
|
|
69
69
|
</div>
|
|
70
70
|
<P marginBottom='xl' className='text-center'>
|
|
71
|
-
To get started, edit the App.tsx file.
|
|
71
|
+
To get started, edit the App.tsx file.{' '}
|
|
72
72
|
<span className='font-bold'>Count: {count}</span>
|
|
73
73
|
</P>
|
|
74
74
|
<div className='flex gap-4 justify-center mb-8'>
|
|
@@ -45,7 +45,7 @@ function App() {
|
|
|
45
45
|
/>
|
|
46
46
|
</div>
|
|
47
47
|
<P marginBottom='xl' className='text-center'>
|
|
48
|
-
To get started, edit the App.tsx file.
|
|
48
|
+
To get started, edit the App.tsx file.{' '}
|
|
49
49
|
<span className='font-bold'>Count: {count}</span>
|
|
50
50
|
</P>
|
|
51
51
|
<div className='flex gap-4 justify-center mb-8'>
|
|
@@ -45,7 +45,7 @@ export function App() {
|
|
|
45
45
|
/>
|
|
46
46
|
</div>
|
|
47
47
|
<P marginBottom='xl' className='text-center'>
|
|
48
|
-
To get started, edit the App.tsx file.
|
|
48
|
+
To get started, edit the App.tsx file.{' '}
|
|
49
49
|
<span className='font-bold'>Count: {count}</span>
|
|
50
50
|
</P>
|
|
51
51
|
<div className='flex gap-4 justify-center mb-8'>
|
|
@@ -67,7 +67,7 @@ function App() {
|
|
|
67
67
|
/>
|
|
68
68
|
<Spacer size='xl' />
|
|
69
69
|
<P marginBottom='xl' className='text-center'>
|
|
70
|
-
{t('started', { fileName: 'app.tsx' })}
|
|
70
|
+
{t('started', { fileName: 'app.tsx' })}{' '}
|
|
71
71
|
<span className='font-bold'>{t('count', { count: count })}</span>
|
|
72
72
|
</P>
|
|
73
73
|
<div className='flex gap-4 justify-center'>
|
|
@@ -94,7 +94,7 @@ function App() {
|
|
|
94
94
|
/>
|
|
95
95
|
<Spacer size='xl' />
|
|
96
96
|
<P marginBottom='xl' className='text-center'>
|
|
97
|
-
{t('started', { fileName: 'app.tsx' })}
|
|
97
|
+
{t('started', { fileName: 'app.tsx' })}{' '}
|
|
98
98
|
<span className='font-bold'>{t('count', { count: count })}</span>
|
|
99
99
|
</P>
|
|
100
100
|
<div className='flex gap-4 justify-center mb-8'>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"started":"To get started, edit the {{fileName}} file.",
|
|
3
|
-
"count":"Count: {{
|
|
3
|
+
"count":"Count: {{count}}",
|
|
4
4
|
"increaseCount":"Increase counter",
|
|
5
5
|
"decreaseCount":"Decrease counter",
|
|
6
6
|
"dataLoading_one": "Data loaded successfully. {{length}} element in the query.",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"started": "Para comenzar, edita el archivo {{fileName}}.",
|
|
3
|
-
"count": "Contador: {{
|
|
3
|
+
"count": "Contador: {{count}}",
|
|
4
4
|
"increaseCount": "Incrementar contador",
|
|
5
5
|
"decreaseCount": "Disminuir contador",
|
|
6
6
|
"dataLoading_one": "Datos cargados correctamente. {{count}} elemento en la consulta.",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"started": "Pour commencer, modifiez le fichier {{fileName}}.",
|
|
3
|
-
"count": "Compteur : {{
|
|
3
|
+
"count": "Compteur : {{count}}",
|
|
4
4
|
"increaseCount": "Augmenter le compteur",
|
|
5
5
|
"decreaseCount": "Diminuer le compteur",
|
|
6
6
|
"dataLoading_one": "Données chargées avec succès. {{count}} élément dans la requête.",
|
|
@@ -2,7 +2,7 @@ import { P } from '@undp/design-system-react/Typography';
|
|
|
2
2
|
import { Button } from '@undp/design-system-react/Button';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
|
|
5
|
-
import { useCounterActions, useCounter } from '
|
|
5
|
+
import { useCounterActions, useCounter } from './stores/counter';
|
|
6
6
|
|
|
7
7
|
function App() {
|
|
8
8
|
const count = useCounter();
|
|
@@ -47,7 +47,7 @@ function App() {
|
|
|
47
47
|
/>
|
|
48
48
|
</div>
|
|
49
49
|
<P marginBottom='xl' className='text-center'>
|
|
50
|
-
{t('started', { fileName: 'app.tsx' })}
|
|
50
|
+
{t('started', { fileName: 'app.tsx' })}{' '}
|
|
51
51
|
<span className='font-bold'>{t('count', { count: count })}</span>
|
|
52
52
|
</P>
|
|
53
53
|
<div className='flex gap-4 justify-center mb-8'>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboutPage": "To edit this page, edit the {{fileName}} file in the routes folder.",
|
|
3
3
|
"started":"To get started, edit the {{fileName}} file.",
|
|
4
|
-
"count":"Count: {{
|
|
4
|
+
"count":"Count: {{count}}",
|
|
5
5
|
"increaseCount":"Increase counter",
|
|
6
6
|
"decreaseCount":"Decrease counter",
|
|
7
7
|
"subscribe":"Subscribe to email",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboutPage": "Para editar esta página, edita el archivo {{fileName}} en la carpeta routes.",
|
|
3
3
|
"started": "Para comenzar, edita el archivo {{fileName}}.",
|
|
4
|
-
"count": "Contador: {{
|
|
4
|
+
"count": "Contador: {{count}}",
|
|
5
5
|
"increaseCount": "Incrementar contador",
|
|
6
6
|
"decreaseCount": "Disminuir contador",
|
|
7
7
|
"subscribe": "Suscribirse al correo electrónico",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboutPage": "Pour modifier cette page, modifiez le fichier {{fileName}} dans le dossier routes.",
|
|
3
3
|
"started": "Pour commencer, modifiez le fichier {{fileName}}.",
|
|
4
|
-
"count": "Compteur : {{
|
|
4
|
+
"count": "Compteur : {{count}}",
|
|
5
5
|
"increaseCount": "Augmenter le compteur",
|
|
6
6
|
"decreaseCount": "Diminuer le compteur",
|
|
7
7
|
"subscribe": "S’abonner par e-mail",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P } from '@undp/design-system-react/Typography';
|
|
2
2
|
import { Button } from '@undp/design-system-react/Button';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useCounterActions, useCounter } from '
|
|
4
|
+
import { useCounterActions, useCounter } from './stores/counter';
|
|
5
5
|
|
|
6
6
|
export function App() {
|
|
7
7
|
const count = useCounter();
|
|
@@ -46,7 +46,7 @@ export function App() {
|
|
|
46
46
|
/>
|
|
47
47
|
</div>
|
|
48
48
|
<P marginBottom='xl' className='text-center'>
|
|
49
|
-
{t('started', { fileName: 'app.tsx' })}
|
|
49
|
+
{t('started', { fileName: 'app.tsx' })}{' '}
|
|
50
50
|
<span className='font-bold'>{t('count', { count: count })}</span>
|
|
51
51
|
</P>
|
|
52
52
|
<div className='flex gap-4 justify-center mb-8'>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboutPage": "To edit this page, edit the {{fileName}} file in the routes folder.",
|
|
3
3
|
"started":"To get started, edit the {{fileName}} file.",
|
|
4
|
-
"count":"Count: {{
|
|
4
|
+
"count":"Count: {{count}}",
|
|
5
5
|
"increaseCount":"Increase counter",
|
|
6
6
|
"decreaseCount":"Decrease counter",
|
|
7
7
|
"subscribe":"Subscribe to email",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboutPage": "Para editar esta página, edita el archivo {{fileName}} en la carpeta routes.",
|
|
3
3
|
"started": "Para comenzar, edita el archivo {{fileName}}.",
|
|
4
|
-
"count": "Contador: {{
|
|
4
|
+
"count": "Contador: {{count}}",
|
|
5
5
|
"increaseCount": "Incrementar contador",
|
|
6
6
|
"decreaseCount": "Disminuir contador",
|
|
7
7
|
"subscribe": "Suscribirse al correo electrónico",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aboutPage": "Pour modifier cette page, modifiez le fichier {{fileName}} dans le dossier routes.",
|
|
3
3
|
"started": "Pour commencer, modifiez le fichier {{fileName}}.",
|
|
4
|
-
"count": "Compteur : {{
|
|
4
|
+
"count": "Compteur : {{count}}",
|
|
5
5
|
"increaseCount": "Augmenter le compteur",
|
|
6
6
|
"decreaseCount": "Diminuer le compteur",
|
|
7
7
|
"subscribe": "S’abonner par e-mail",
|