Skip to content

Commit

Permalink
skipQuickStart param for README template (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
rin-st authored Oct 29, 2024
1 parent 5a9157e commit c29c59d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-dingos-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-eth": patch
---

skipQuickStart param for README template
14 changes: 8 additions & 6 deletions templates/base/README.md.template.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const getQuickStart = ({
contractsPath,
scriptsPath,
testCommand,
}) => `## Quickstart
}) => `
## Quickstart
To get started with Scaffold-ETH 2, follow the steps below:
Expand All @@ -16,10 +17,10 @@ To get started with Scaffold-ETH 2, follow the steps below:
cd my-dapp-example
yarn install
\`\`\`
${
Boolean(solidityFramework[0])
? `2. Run a local network in the first terminal:
? `
2. Run a local network in the first terminal:
\`\`\`
yarn chain
Expand Down Expand Up @@ -49,14 +50,15 @@ ${
? `
Run smart contract test with ${testCommand[0]}
- Edit your smart contract \`YourContract.sol\` in ${contractsPath[0]}
- Edit your smart contracts in ${contractsPath[0]}
- Edit your frontend homepage at \`packages/nextjs/app/page.tsx\`. For guidance on [routing](https://nextjs.org/docs/app/building-your-application/routing/defining-routes) and configuring [pages/layouts](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts) checkout the Next.js documentation.
- Edit your deployment scripts in ${scriptsPath[0]}
`
: ""
}`;

const contents = ({
skipQuickStart,
solidityFramework,
networkConfigPath,
contractsPath,
Expand Down Expand Up @@ -95,8 +97,7 @@ Before you begin, you need to install the following tools:
- [Node (>= v18.18)](https://nodejs.org/en/download/)
- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install))
- [Git](https://git-scm.com/downloads)
${getQuickStart({
${skipQuickStart[0] ? "" : getQuickStart({
solidityFramework,
networkConfigPath,
contractsPath,
Expand All @@ -117,6 +118,7 @@ We welcome contributions to Scaffold-ETH 2!
Please see [CONTRIBUTING.MD](https://github.com/scaffold-eth/scaffold-eth-2/blob/main/CONTRIBUTING.md) for more information and guidelines for contributing to Scaffold-ETH 2.`;

export default withDefaults(contents, {
skipQuickStart: false,
solidityFramework: "",
networkConfigPath: "",
contractsPath: "",
Expand Down

0 comments on commit c29c59d

Please sign in to comment.