Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/solid-hotels-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

CLI updates for stylus - new templates
14 changes: 14 additions & 0 deletions packages/thirdweb/src/cli/commands/stylus/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export async function createStylusProject() {
{ title: "Airdrop ERC20", value: "airdrop20" },
{ title: "Airdrop ERC721", value: "airdrop721" },
{ title: "Airdrop ERC1155", value: "airdrop1155" },
{ title: "ZK ERC721", value: "zk-erc721" },
{ title: "ZK ERC20", value: "zk-erc20" },
],
message: "Select a template:",
name: "projectType",
Expand Down Expand Up @@ -119,6 +121,18 @@ export async function createStylusProject() {
newProject = spawnSync("git", ["clone", repoUrl, projectName], {
stdio: "inherit",
});
} else if (projectType === "zk-erc721") {
const repoUrl = "git@github.com:thirdweb-example/stylus-zk-erc721.git";
spinner.start(`Creating new ZK ERC721 Stylus project: ${projectName}...`);
newProject = spawnSync("git", ["clone", repoUrl, projectName], {
stdio: "inherit",
});
} else if (projectType === "zk-erc20") {
const repoUrl = "git@github.com:thirdweb-example/stylus-zk-erc20.git";
spinner.start(`Creating new ZK ERC20 Stylus project: ${projectName}...`);
newProject = spawnSync("git", ["clone", repoUrl, projectName], {
stdio: "inherit",
});
}

if (!newProject || newProject.status !== 0) {
Expand Down
Loading