Skip to content

Commit

Permalink
Updating readme template
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahilsen committed Feb 25, 2023
1 parent 7511e48 commit 999793f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 42 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# QuickNode Guide Examples

A collection of example applications from QuickNode's [guides](https://quicknode.com/guides) and more.

When contributing add a README.md file to your directory with step-by-step info to run the project. Get the template from [TEMPLATE_README.md](https://github.com/quiknode-labs/qn-guide-examples/blob/main/TEMPLATE_README.md)
58 changes: 16 additions & 42 deletions TEMPLATE_README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,32 @@
# Instructions (Delete this section after completing)
# This is where you will add the heading and link a guide if a guide on this topic exists.

When creating a new example, copy the contents of this template into a new `README.md` file in the example directory and fill in the required pieces of information. All example `README` files should include the following:
#### Prerequisites
- Prerequisites for the project will go here in bullet points manner.

- [ ] `INSERT_TITLE`
- [ ] `INSERT_GUIDE_NAME`
- [ ] `INSERT_GUIDE_LINK`
- [ ] `INSERT_AUTHOR`
- [ ] `INSERT_CHAIN`
- [ ] `INSERT_PROJECT`
---
### Step 1️⃣ - Step number one

After that some sections may or may not be applicable depending on the given project. Make sure to delete any unnecessary sections.

- [ ] `ENVIRONMENT VARIABLES` - Not all projects will include environment variables but we highly recommend setting up your project to use them with something like `dotenv` if secrets are included in the code (for example an endpoint or private key).
- [ ] `DEPENDENCIES` - Some projects will not require installing dependencies.
- [ ] `SCRIPT` - Not all projects will have a script to run.
- [ ] `START` - However, if a Node script is included we recommend following the `start` naming convention when possible.
- [ ] `PACKAGE MANAGERS` - We recommend doing your best to support the main three package managers, `npm`, `yarn`, and `pnpm` when possible:
- [ ] `YARN` - Include a blank `.yarnrc.yml` file to prevent Yarn 3 from breaking. We recommend example maintainers use Yarn 1 when testing projects on their local machine.
- [ ] `PNPM` - Include a `.npmrc` file with `auto-install-peers=true` and `strict-peer-dependencies=false` to prevent `pnpm` from breaking.
- [ ] `TYPESCRIPT` - Make sure to create a `tsconfig.json` file and install the following development dependencies when using TypeScript: `@types/node`, `ts-node`, `typescript`.

# INSERT_TITLE
---
### Step 2️⃣ - Step number two

This project is based on the guide, [INSERT_GUIDE_NAME](INSERT_GUIDE_LINK) by INSERT_AUTHOR.
This can be first step too if there is no setup required before cloning the repo

## Clone Example Monorepo
#### Clone Example Monorepo

To begin, clone the `qn-guide-examples` repo and navigate to this project's directory.
To begin, clone the `qn-guide-examples` repo, navigate to this project's directory, install dependencies and open the project directory in a code editor (VS code in this case).

```bash
git clone https://github.com/quiknode-labs/qn-guide-examples.git
cd qn-guide-examples/INSERT_CHAIN/INSERT_PROJECT
cd qn-guide-examples/ (Update this line with the particular directory)
npm install
code .
```

## Add Environment Variables

```bash
cp .env.example .env
```

## Install Dependencies

Either `npm`, `yarn`, or `pnpm` can be used to install the project's dependencies.

If you are adding a link to QuickNode website use the following format for link
```bash
npm i
yarn
pnpm i
https://www.quicknode.com/?utm_source=qn-github&utm_campaign=<update this part>&utm_content=sign-up&utm_medium=generic
```

## Run Script

```bash
npm start
yarn start
pnpm start
```
Update the value of `utm_campaign` with the name of your directory.

0 comments on commit 999793f

Please sign in to comment.