create-better-t-stack 2.22.7 → 2.22.9
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.js +26 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -650,7 +650,7 @@ async function getFrontendChoice(frontendOptions, backend) {
|
|
|
650
650
|
},
|
|
651
651
|
{
|
|
652
652
|
value: "tanstack-start",
|
|
653
|
-
label: "TanStack Start (
|
|
653
|
+
label: "TanStack Start (vite)",
|
|
654
654
|
hint: "SSR, Server Functions, API Routes and more with TanStack Router"
|
|
655
655
|
}
|
|
656
656
|
];
|
|
@@ -3840,6 +3840,29 @@ function generateScriptsList(packageManagerRunCmd, database, orm, _auth, hasNati
|
|
|
3840
3840
|
return scripts;
|
|
3841
3841
|
}
|
|
3842
3842
|
|
|
3843
|
+
//#endregion
|
|
3844
|
+
//#region src/helpers/project-generation/git.ts
|
|
3845
|
+
async function initializeGit(projectDir, useGit) {
|
|
3846
|
+
if (!useGit) return;
|
|
3847
|
+
const gitVersionResult = await $({
|
|
3848
|
+
cwd: projectDir,
|
|
3849
|
+
reject: false,
|
|
3850
|
+
stderr: "pipe"
|
|
3851
|
+
})`git --version`;
|
|
3852
|
+
if (gitVersionResult.exitCode !== 0) {
|
|
3853
|
+
log.warn(pc.yellow("Git is not installed"));
|
|
3854
|
+
return;
|
|
3855
|
+
}
|
|
3856
|
+
const result = await $({
|
|
3857
|
+
cwd: projectDir,
|
|
3858
|
+
reject: false,
|
|
3859
|
+
stderr: "pipe"
|
|
3860
|
+
})`git init`;
|
|
3861
|
+
if (result.exitCode !== 0) throw new Error(`Git initialization failed: ${result.stderr}`);
|
|
3862
|
+
await $({ cwd: projectDir })`git add -A`;
|
|
3863
|
+
await $({ cwd: projectDir })`git commit -m ${"Initial commit"}`;
|
|
3864
|
+
}
|
|
3865
|
+
|
|
3843
3866
|
//#endregion
|
|
3844
3867
|
//#region src/helpers/project-generation/post-installation.ts
|
|
3845
3868
|
function displayPostInstallInstructions(config) {
|
|
@@ -3852,7 +3875,7 @@ function displayPostInstallInstructions(config) {
|
|
|
3852
3875
|
const tauriInstructions = addons?.includes("tauri") ? getTauriInstructions(runCmd) : "";
|
|
3853
3876
|
const lintingInstructions = hasHuskyOrBiome ? getLintingInstructions(runCmd) : "";
|
|
3854
3877
|
const nativeInstructions = frontend?.includes("native-nativewind") || frontend?.includes("native-unistyles") ? getNativeInstructions(isConvex) : "";
|
|
3855
|
-
const pwaInstructions = addons?.includes("pwa") &&
|
|
3878
|
+
const pwaInstructions = addons?.includes("pwa") && frontend?.includes("react-router") ? getPwaInstructions() : "";
|
|
3856
3879
|
const starlightInstructions = addons?.includes("starlight") ? getStarlightInstructions(runCmd) : "";
|
|
3857
3880
|
const hasWeb = frontend?.some((f) => [
|
|
3858
3881
|
"tanstack-router",
|
|
@@ -4110,24 +4133,6 @@ async function updateConvexPackageJson(projectDir, options) {
|
|
|
4110
4133
|
if (!convexPackageJson.scripts) convexPackageJson.scripts = {};
|
|
4111
4134
|
await fs.writeJson(convexPackageJsonPath, convexPackageJson, { spaces: 2 });
|
|
4112
4135
|
}
|
|
4113
|
-
async function initializeGit(projectDir, useGit) {
|
|
4114
|
-
if (!useGit) return;
|
|
4115
|
-
const gitVersionResult = await $({
|
|
4116
|
-
cwd: projectDir,
|
|
4117
|
-
reject: false,
|
|
4118
|
-
stderr: "pipe"
|
|
4119
|
-
})`git --version`;
|
|
4120
|
-
if (gitVersionResult.exitCode !== 0) {
|
|
4121
|
-
log.warn(pc.yellow("Git is not installed"));
|
|
4122
|
-
return;
|
|
4123
|
-
}
|
|
4124
|
-
const result = await $({
|
|
4125
|
-
cwd: projectDir,
|
|
4126
|
-
reject: false,
|
|
4127
|
-
stderr: "pipe"
|
|
4128
|
-
})`git init`;
|
|
4129
|
-
if (result.exitCode !== 0) throw new Error(`Git initialization failed: ${result.stderr}`);
|
|
4130
|
-
}
|
|
4131
4136
|
|
|
4132
4137
|
//#endregion
|
|
4133
4138
|
//#region src/helpers/project-generation/create-project.ts
|
|
@@ -4159,7 +4164,6 @@ async function createProject(options) {
|
|
|
4159
4164
|
await updatePackageConfigurations(projectDir, options);
|
|
4160
4165
|
await createReadme(projectDir, options);
|
|
4161
4166
|
await writeBtsConfig(options);
|
|
4162
|
-
await initializeGit(projectDir, options.git);
|
|
4163
4167
|
log.success("Project template successfully scaffolded!");
|
|
4164
4168
|
if (options.install) {
|
|
4165
4169
|
await installDependencies({
|
|
@@ -4168,6 +4172,7 @@ async function createProject(options) {
|
|
|
4168
4172
|
});
|
|
4169
4173
|
await generateCloudflareWorkerTypes(options);
|
|
4170
4174
|
}
|
|
4175
|
+
await initializeGit(projectDir, options.git);
|
|
4171
4176
|
displayPostInstallInstructions({
|
|
4172
4177
|
...options,
|
|
4173
4178
|
depsInstalled: options.install
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.9",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|