Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skipQuickStart param for README template #144

Merged
merged 3 commits into from
Oct 29, 2024
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/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
Loading