@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.
Files changed (137) hide show
  1. package/bin/generateFiles/generatePackageJson.js +12 -30
  2. package/bin/generateFiles/generateViteConfig.js +2 -4
  3. package/bin/index.js +1 -1
  4. package/bin/promptUser.js +21 -2
  5. package/bin/templates/next/auth/biome.json +67 -0
  6. package/bin/templates/next/basic/biome.json +67 -0
  7. package/bin/templates/vite/basic/biome.json +67 -0
  8. package/bin/templates/vite/query/biome.json +67 -0
  9. package/bin/templates/vite/query/src/App.tsx +1 -1
  10. package/bin/templates/vite/query+router/biome.json +67 -0
  11. package/bin/templates/vite/query+router/src/App.tsx +1 -1
  12. package/bin/templates/vite/query+router/src/components/Header.tsx +1 -1
  13. package/bin/templates/vite/query+router/src/routes/queryDemo.tsx +5 -5
  14. package/bin/templates/vite/router/biome.json +67 -0
  15. package/bin/templates/vite/router/src/App.tsx +1 -1
  16. package/bin/templates/vite/router/src/routes/about.tsx +5 -5
  17. package/bin/templates/viteWithLanguage/basic/README.md +75 -0
  18. package/bin/templates/viteWithLanguage/basic/biome.json +67 -0
  19. package/bin/templates/viteWithLanguage/basic/index.html +13 -0
  20. package/bin/templates/viteWithLanguage/basic/public/favicon.ico +0 -0
  21. package/bin/templates/viteWithLanguage/basic/public/imgs/Tailwind_CSS_Logo.svg +1 -0
  22. package/bin/templates/viteWithLanguage/basic/public/imgs/Vitejs-logo.svg +15 -0
  23. package/bin/templates/viteWithLanguage/basic/public/imgs/Zustand-logo.svg +266 -0
  24. package/bin/templates/viteWithLanguage/basic/public/imgs/undp-logo-blue.svg +1 -0
  25. package/bin/templates/viteWithLanguage/basic/src/App.tsx +95 -0
  26. package/bin/templates/viteWithLanguage/basic/src/assets/undp-logo-blue.svg +1 -0
  27. package/bin/templates/viteWithLanguage/basic/src/i18n.ts +31 -0
  28. package/bin/templates/viteWithLanguage/basic/src/locales/en/common.json +6 -0
  29. package/bin/templates/viteWithLanguage/basic/src/locales/es/common.json +6 -0
  30. package/bin/templates/viteWithLanguage/basic/src/locales/fr/common.json +6 -0
  31. package/bin/templates/viteWithLanguage/basic/src/main.tsx +15 -0
  32. package/bin/templates/viteWithLanguage/basic/src/stores/counter.ts +23 -0
  33. package/bin/templates/viteWithLanguage/basic/src/styles/fonts.css +213 -0
  34. package/bin/templates/viteWithLanguage/basic/src/styles/style.css +3 -0
  35. package/bin/templates/viteWithLanguage/basic/src/vite-env.d.ts +1 -0
  36. package/bin/templates/viteWithLanguage/basic/tailwind.config.js +7 -0
  37. package/bin/templates/viteWithLanguage/basic/tsconfig.json +29 -0
  38. package/bin/templates/viteWithLanguage/basic/tsconfig.node.json +9 -0
  39. package/bin/templates/viteWithLanguage/basic/vite.config.ts +58 -0
  40. package/bin/templates/viteWithLanguage/query/README.md +80 -0
  41. package/bin/templates/viteWithLanguage/query/biome.json +67 -0
  42. package/bin/templates/viteWithLanguage/query/index.html +13 -0
  43. package/bin/templates/viteWithLanguage/query/public/favicon.ico +0 -0
  44. package/bin/templates/viteWithLanguage/query/public/imgs/Tailwind_CSS_Logo.svg +1 -0
  45. package/bin/templates/viteWithLanguage/query/public/imgs/Tanstack-logo.png +0 -0
  46. package/bin/templates/viteWithLanguage/query/public/imgs/Vitejs-logo.svg +15 -0
  47. package/bin/templates/viteWithLanguage/query/public/imgs/Zustand-logo.svg +266 -0
  48. package/bin/templates/viteWithLanguage/query/public/imgs/undp-logo-blue.svg +1 -0
  49. package/bin/templates/viteWithLanguage/query/src/App.tsx +125 -0
  50. package/bin/templates/viteWithLanguage/query/src/assets/undp-logo-blue.svg +1 -0
  51. package/bin/templates/viteWithLanguage/query/src/constants.ts +16 -0
  52. package/bin/templates/viteWithLanguage/query/src/i18n.ts +31 -0
  53. package/bin/templates/viteWithLanguage/query/src/integration/tanstack-query.tsx +28 -0
  54. package/bin/templates/viteWithLanguage/query/src/locales/en/common.json +8 -0
  55. package/bin/templates/viteWithLanguage/query/src/locales/es/common.json +8 -0
  56. package/bin/templates/viteWithLanguage/query/src/locales/fr/common.json +8 -0
  57. package/bin/templates/viteWithLanguage/query/src/main.tsx +24 -0
  58. package/bin/templates/viteWithLanguage/query/src/stores/counter.ts +23 -0
  59. package/bin/templates/viteWithLanguage/query/src/styles/fonts.css +213 -0
  60. package/bin/templates/viteWithLanguage/query/src/styles/style.css +3 -0
  61. package/bin/templates/viteWithLanguage/query/src/vite-env.d.ts +1 -0
  62. package/bin/templates/viteWithLanguage/query/tailwind.config.js +7 -0
  63. package/bin/templates/viteWithLanguage/query/tsconfig.json +29 -0
  64. package/bin/templates/viteWithLanguage/query/tsconfig.node.json +9 -0
  65. package/bin/templates/viteWithLanguage/query/vite.config.ts +58 -0
  66. package/bin/templates/viteWithLanguage/query+router/README.md +111 -0
  67. package/bin/templates/viteWithLanguage/query+router/biome.json +67 -0
  68. package/bin/templates/viteWithLanguage/query+router/index.html +13 -0
  69. package/bin/templates/viteWithLanguage/query+router/public/favicon.ico +0 -0
  70. package/bin/templates/viteWithLanguage/query+router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
  71. package/bin/templates/viteWithLanguage/query+router/public/imgs/Tanstack-logo.png +0 -0
  72. package/bin/templates/viteWithLanguage/query+router/public/imgs/Vitejs-logo.svg +15 -0
  73. package/bin/templates/viteWithLanguage/query+router/public/imgs/Zustand-logo.svg +266 -0
  74. package/bin/templates/viteWithLanguage/query+router/public/imgs/undp-logo-blue.svg +1 -0
  75. package/bin/templates/viteWithLanguage/query+router/src/App.tsx +75 -0
  76. package/bin/templates/viteWithLanguage/query+router/src/Icons.tsx +74 -0
  77. package/bin/templates/viteWithLanguage/query+router/src/assets/undp-logo-blue.svg +1 -0
  78. package/bin/templates/viteWithLanguage/query+router/src/components/Footer.tsx +16 -0
  79. package/bin/templates/viteWithLanguage/query+router/src/components/Header.tsx +70 -0
  80. package/bin/templates/viteWithLanguage/query+router/src/constants.ts +16 -0
  81. package/bin/templates/viteWithLanguage/query+router/src/i18n.ts +31 -0
  82. package/bin/templates/viteWithLanguage/query+router/src/integration/tanstack-query.tsx +28 -0
  83. package/bin/templates/viteWithLanguage/query+router/src/locales/en/common.json +13 -0
  84. package/bin/templates/viteWithLanguage/query+router/src/locales/es/common.json +13 -0
  85. package/bin/templates/viteWithLanguage/query+router/src/locales/fr/common.json +14 -0
  86. package/bin/templates/viteWithLanguage/query+router/src/main.tsx +95 -0
  87. package/bin/templates/viteWithLanguage/query+router/src/routes/queryDemo.tsx +78 -0
  88. package/bin/templates/viteWithLanguage/query+router/src/stores/counter.ts +23 -0
  89. package/bin/templates/viteWithLanguage/query+router/src/styles/fonts.css +213 -0
  90. package/bin/templates/viteWithLanguage/query+router/src/styles/style.css +3 -0
  91. package/bin/templates/viteWithLanguage/query+router/src/vite-env.d.ts +1 -0
  92. package/bin/templates/viteWithLanguage/query+router/tailwind.config.js +7 -0
  93. package/bin/templates/viteWithLanguage/query+router/tsconfig.json +29 -0
  94. package/bin/templates/viteWithLanguage/query+router/tsconfig.node.json +9 -0
  95. package/bin/templates/viteWithLanguage/query+router/vite.config.ts +58 -0
  96. package/bin/templates/viteWithLanguage/router/README.md +106 -0
  97. package/bin/templates/viteWithLanguage/router/biome.json +67 -0
  98. package/bin/templates/viteWithLanguage/router/index.html +13 -0
  99. package/bin/templates/viteWithLanguage/router/public/favicon.ico +0 -0
  100. package/bin/templates/viteWithLanguage/router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
  101. package/bin/templates/viteWithLanguage/router/public/imgs/Tanstack-logo.png +0 -0
  102. package/bin/templates/viteWithLanguage/router/public/imgs/Vitejs-logo.svg +15 -0
  103. package/bin/templates/viteWithLanguage/router/public/imgs/Zustand-logo.svg +266 -0
  104. package/bin/templates/viteWithLanguage/router/public/imgs/undp-logo-blue.svg +1 -0
  105. package/bin/templates/viteWithLanguage/router/src/App.tsx +74 -0
  106. package/bin/templates/viteWithLanguage/router/src/Icons.tsx +74 -0
  107. package/bin/templates/viteWithLanguage/router/src/assets/undp-logo-blue.svg +1 -0
  108. package/bin/templates/viteWithLanguage/router/src/components/Footer.tsx +16 -0
  109. package/bin/templates/viteWithLanguage/router/src/components/Header.tsx +70 -0
  110. package/bin/templates/viteWithLanguage/router/src/constants.ts +16 -0
  111. package/bin/templates/viteWithLanguage/router/src/i18n.ts +31 -0
  112. package/bin/templates/viteWithLanguage/router/src/locales/en/common.json +11 -0
  113. package/bin/templates/viteWithLanguage/router/src/locales/es/common.json +11 -0
  114. package/bin/templates/viteWithLanguage/router/src/locales/fr/common.json +11 -0
  115. package/bin/templates/viteWithLanguage/router/src/main.tsx +89 -0
  116. package/bin/templates/viteWithLanguage/router/src/routes/about.tsx +58 -0
  117. package/bin/templates/viteWithLanguage/router/src/stores/counter.ts +23 -0
  118. package/bin/templates/viteWithLanguage/router/src/styles/fonts.css +213 -0
  119. package/bin/templates/viteWithLanguage/router/src/styles/style.css +3 -0
  120. package/bin/templates/viteWithLanguage/router/src/vite-env.d.ts +1 -0
  121. package/bin/templates/viteWithLanguage/router/tailwind.config.js +7 -0
  122. package/bin/templates/viteWithLanguage/router/tsconfig.json +29 -0
  123. package/bin/templates/viteWithLanguage/router/tsconfig.node.json +9 -0
  124. package/bin/templates/viteWithLanguage/router/vite.config.ts +58 -0
  125. package/package.json +1 -1
  126. package/bin/templates/next/auth/.prettierrc +0 -10
  127. package/bin/templates/next/auth/eslint.config.mjs +0 -103
  128. package/bin/templates/next/basic/.prettierrc +0 -10
  129. package/bin/templates/next/basic/eslint.config.mjs +0 -103
  130. package/bin/templates/vite/basic/.prettierrc +0 -10
  131. package/bin/templates/vite/basic/eslint.config.mjs +0 -97
  132. package/bin/templates/vite/query/.prettierrc +0 -10
  133. package/bin/templates/vite/query/eslint.config.mjs +0 -97
  134. package/bin/templates/vite/query+router/.prettierrc +0 -10
  135. package/bin/templates/vite/query+router/eslint.config.mjs +0 -97
  136. package/bin/templates/vite/router/.prettierrc +0 -10
  137. package/bin/templates/vite/router/eslint.config.mjs +0 -97
@@ -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
- ]);
@@ -1,10 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": true,
4
- "trailingComma": "all",
5
- "arrowParens": "avoid",
6
- "tabWidth": 2,
7
- "jsxSingleQuote": true,
8
- "endOfLine": "auto",
9
- "bracketSpacing": true
10
- }
@@ -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
- ]);
@@ -1,10 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": true,
4
- "trailingComma": "all",
5
- "arrowParens": "avoid",
6
- "tabWidth": 2,
7
- "jsxSingleQuote": true,
8
- "endOfLine": "auto",
9
- "bracketSpacing": true
10
- }
@@ -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
- ]);