Skip to content

Commit b64c8e7

Browse files
authored
Remove old CLI templates (#2945)
1 parent 795a59e commit b64c8e7

File tree

3 files changed

+6
-36
lines changed

3 files changed

+6
-36
lines changed

.changeset/dull-planets-sneeze.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@thirdweb-dev/cli": patch
3+
"thirdweb": patch
4+
---
5+
6+
Removes deprecated template options from the CLI, specifically PWA Vite, Express, and React

legacy_packages/cli/src/cli/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,9 @@ const main = async () => {
253253
.option("--forge", "Initialize as a Forge project.")
254254
.option("--hardhat", "Initialize as a Hardhat project.")
255255
.option("--extension", "Create a smart contract extension.")
256-
.option("--react", "Initialize as a Create React App project.")
257256
.option("--next", "Initialize as a Next.js project.")
258257
.option("--vite", "Initialize as a Vite project.")
259-
.option("--express", "Initialize as a Express project.")
260258
.option("--node", "Initialize as a Node project.")
261-
.option("--pwaVite", "Initialize as a PWA project.")
262259
.option(
263260
"--use-npm",
264261
"Explicitly tell the CLI to bootstrap the app using npm",

legacy_packages/cli/src/create/command.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ export async function twCreate(
4444

4545
// case where users use `npx thirdweb create --option` directly
4646
if (!projectType && Object.keys(options).length > 0) {
47-
if (options.react) {
48-
projectType = "app";
49-
framework = "cra";
50-
}
51-
5247
if (options.next) {
5348
projectType = "app";
5449
framework = "next";
@@ -63,42 +58,18 @@ export async function twCreate(
6358
projectType = "app";
6459
framework = "node";
6560
}
66-
67-
if (options.express) {
68-
projectType = "app";
69-
framework = "express";
70-
}
71-
72-
if (options.pwaVite) {
73-
projectType = "app";
74-
framework = "pwa-vite";
75-
}
76-
77-
if (options.reactNative) {
78-
projectType = "app";
79-
framework = "react-native";
80-
}
8161
}
8262

8363
if (projectType === "app") {
8464
if (options.next) {
8565
framework = "next";
8666
}
87-
if (options.react) {
88-
framework = "cra";
89-
}
9067
if (options.vite) {
9168
framework = "vite";
9269
}
9370
if (options.node) {
9471
framework = "node";
9572
}
96-
if (options.express) {
97-
framework = "express";
98-
}
99-
if (options.pwaVite) {
100-
framework = "pwa-vite";
101-
}
10273

10374
if (options.evm) {
10475
chain = "evm";
@@ -240,11 +211,7 @@ export async function twCreate(
240211
message: CREATE_MESSAGES.framework,
241212
choices: [
242213
{ title: "Next.js", value: "next" },
243-
{ title: "Create React App", value: "cra" },
244214
{ title: "Vite", value: "vite" },
245-
{ title: "PWA Vite", value: "pwa-vite" },
246-
{ title: "Node.js", value: "node" },
247-
{ title: "Express", value: "express" },
248215
],
249216
});
250217

0 commit comments

Comments
 (0)