-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update to use pnpx and pnpm everywhere for envio command. #526
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -9,6 +9,8 @@ slug: /cli-commands | |||
|
|||
This document contains the help content for the `envio` command-line program. | |||
|
|||
**_Note:_** `envio` is an executable, but it is recommended to always run `pnpx envio@latest` for the init command and `pnpm envio` when interacting with a specific repo. This ensures that you are using an up to date version for new projects, and use the correct version of the envio executable for local project you may look at. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only file that I did not add pnpm or pnpx to.
@@ -13,8 +13,7 @@ import TabItem from "@theme/TabItem"; | |||
Once the configuration and schema files are in place, run: | |||
|
|||
```bash | |||
envio codegen | |||
``` | |||
pnpm envio codegen``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some broken places + I added a few comments for you to consider
@@ -7,15 +7,15 @@ slug: /generated-files | |||
|
|||
# Generated files | |||
|
|||
The `/generated` directory contains essential files required for performing the indexing process in Envio. These files are automatically generated using the `envio codegen` CLI command and they should NOT be modified by the end user. | |||
The `/generated` directory contains essential files required for performing the indexing process in Envio. These files are automatically generated using the `pnpm envio codegen` CLI command and they should NOT be modified by the end user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `/generated` directory contains essential files required for performing the indexing process in Envio. These files are automatically generated using the `pnpm envio codegen` CLI command and they should NOT be modified by the end user. | |
The `/generated` directory contains essential files required for performing the indexing process in Envio. These files are automatically generated using the `pnpm codegen` CLI command and they should NOT be modified by the end user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe even skip envio
and have pnpm codegen
?
1. Install Envio via `npm i -g [email protected]` | ||
1. Generate indexing code via `envio codegen` | ||
1. Run the indexer via `envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `envio stop` | ||
1. Generate indexing code via `pnpm envio codegen` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong
``` | ||
|
||
or | ||
|
||
``` | ||
export ENVIO_PG_PORT=5433 | ||
envio codegen | ||
envio dev | ||
pnpm envio codegenpnpm envio dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken
@@ -58,16 +58,14 @@ If Postgres is running locally on port 5432, then you can run the whole system w | |||
In practice, this could look like this: | |||
|
|||
``` | |||
ENVIO_PG_PORT=5433 envio codegen | |||
ENVIO_PG_PORT=5433 envio dev | |||
ENVIO_PG_PORT=5433 pnpm envio codegenENVIO_PG_PORT=5433 pnpm envio dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken
@@ -47,7 +47,7 @@ More information on [the Quickstart](./contract-import) can be found in this doc | |||
|
|||
### Templates | |||
|
|||
Select either the `ERC20`, `Greeter`, or `Blank` template following the `envio init` command. | |||
Select either the `ERC20`, `Greeter`, or `Blank` template following the `pnpx envio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken
@@ -9,7 +9,7 @@ slug: /benchmarking | |||
|
|||
### Capturing the benchmark | |||
|
|||
You can run `envio start --bench` to capture some benchmarking data while your indexer is running. This should not be run in production, since it holds each benchmark data point in memory and adds some overhead in writing to a file. | |||
You can run `pnpm envio start --bench` to capture some benchmarking data while your indexer is running. This should not be run in production, since it holds each benchmark data point in memory and adds some overhead in writing to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only downside of dropping envio
and having only pnpm start
is that flags won't work in this case.
@@ -21,7 +21,7 @@ Before we start indexing, you'll need to make sure you have the [prerequisites]( | |||
|
|||
Now that you have installed the prerequisite packages required, let’s jump into the practical steps of setting up the indexer. | |||
|
|||
1. Open your terminal in an empty repository and initialize a new indexer by running the command ‘envio init’ | |||
1. Open your terminal in an empty repository and initialize a new indexer by running the command ‘pnpx envio@latest init’ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd skip latest
for simplicity, as I understand it works good with pnpx
No description provided.