create-init-mtv-app 1.0.4 → 1.0.5
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/dist/index.mjs +30 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1035,6 +1035,28 @@ async function setupNextjs(projectName, dbProvider, dbTool, uiLibrary, isNeverTh
|
|
|
1035
1035
|
await setupJest(projectName);
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
|
+
//#endregion
|
|
1039
|
+
//#region src/installers/reactTSRouter/reactTSRouter.ts
|
|
1040
|
+
async function createReactTSRouterApp(projectName) {
|
|
1041
|
+
await execa("npx", [
|
|
1042
|
+
"create-tsrouter-app@latest",
|
|
1043
|
+
projectName,
|
|
1044
|
+
"--template",
|
|
1045
|
+
"file-router",
|
|
1046
|
+
"--tailwind",
|
|
1047
|
+
"--toolchain",
|
|
1048
|
+
"biome",
|
|
1049
|
+
"--add-ons",
|
|
1050
|
+
"shadcn,tanstack-query,compiler,form"
|
|
1051
|
+
], { stdio: "inherit" });
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
//#endregion
|
|
1055
|
+
//#region src/setup/reactTSRouter.ts
|
|
1056
|
+
async function setupReactTSRouter(projectName) {
|
|
1057
|
+
await createReactTSRouterApp(projectName);
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1038
1060
|
//#endregion
|
|
1039
1061
|
//#region src/create.ts
|
|
1040
1062
|
async function createProject(answers) {
|
|
@@ -1049,8 +1071,12 @@ async function createProject(answers) {
|
|
|
1049
1071
|
case FRAMEWORKS.NEXT_NEST:
|
|
1050
1072
|
await Promise.all([setupNextjs(projectName + "-fe", DB_PROVIDERS.NONE, DB_TOOLS.NONE, uiLibrary, isNeverThrow), setupNestjs(projectName + "-be", dbProvider, dbTool, isNeverThrow)]);
|
|
1051
1073
|
break;
|
|
1052
|
-
case FRAMEWORKS.REACT_EXPRESS:
|
|
1053
|
-
|
|
1074
|
+
case FRAMEWORKS.REACT_EXPRESS:
|
|
1075
|
+
await Promise.all([setupReactTSRouter(projectName + "-fe"), setupExpressjs(projectName + "-be", dbProvider, dbTool, isNeverThrow)]);
|
|
1076
|
+
break;
|
|
1077
|
+
case FRAMEWORKS.REACT_NEST:
|
|
1078
|
+
await Promise.all([setupReactTSRouter(projectName + "-fe"), setupNestjs(projectName + "-be", dbProvider, dbTool, isNeverThrow)]);
|
|
1079
|
+
break;
|
|
1054
1080
|
}
|
|
1055
1081
|
}
|
|
1056
1082
|
|
|
@@ -1092,11 +1118,11 @@ async function ask() {
|
|
|
1092
1118
|
value: FRAMEWORKS.NEXT_NEST
|
|
1093
1119
|
},
|
|
1094
1120
|
{
|
|
1095
|
-
name: "React.js + Express",
|
|
1121
|
+
name: "React.js (tanstack router) + Express",
|
|
1096
1122
|
value: FRAMEWORKS.REACT_EXPRESS
|
|
1097
1123
|
},
|
|
1098
1124
|
{
|
|
1099
|
-
name: "React.js + NestJS",
|
|
1125
|
+
name: "React.js (tanstack router) + NestJS",
|
|
1100
1126
|
value: FRAMEWORKS.REACT_NEST
|
|
1101
1127
|
}
|
|
1102
1128
|
]
|