Skip to content

Commit

Permalink
switch to pnpm v9
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-dot-js committed Jul 15, 2024
1 parent d948170 commit af11650
Show file tree
Hide file tree
Showing 6 changed files with 7,528 additions and 5,184 deletions.
27 changes: 26 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
use flake
# Check if nvm is installed, install if not
if [ ! -d "$NVM_DIR" ] || [ ! -s "$NVM_DIR/nvm.sh" ]; then
echo "nvm is not installed. Installing nvm..."

# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
fi

# ensure nvm is in the path
export NVM_DIR="$HOME/.nvm"
export PATH="$NVM_DIR:$PATH"

# load nvm
\. $NVM_DIR/nvm.sh

# install node version from .nvmrc
nvm install

# enable pnpm in corepack
corepack enable pnpm

# install package manager with corepack (from package.json#packageManager)
corepack install

# install dependencies
pnpm install
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,46 @@ Source code for [ngrok docs](https://ngrok.com/docs); feel free to suggest chang

See our [Contribution Guidelines](CONTRIBUTING.md) for detailed instructions on how to help improve ngrok documentation.

## Setup
## Getting Started

ngrok is built using [Docusaurus 3](https://docusaurus.io/).

Prerequisites required:

- [Node 20+](https://nodejs.org/en/download)
- [pnpm 8+](https://pnpm.io/installation#using-npm)
- [Node 20](https://nodejs.org/en/download)
- [pnpm 9](https://pnpm.io/installation#using-npm)
- [nvm](https://github.com/nvm-sh/nvm)

Both of these can be obtained via [nix-direnv](https://github.com/nix-community/nix-direnv), which will automatically configure your shell for you.
We use [direnv](https://direnv.net/) to assist you with setting up all of the required tooling.

Once you have the pre-requisites installed run the following commands:
First, install `direnv`:

```bash
| OS | command |
| ------ | ----------------------- |
| macOS | brew install direnv |
| ubuntu | sudo apt install direnv |

For all other OSes, see the [direnv installation guide](https://direnv.net/docs/installation.html).

Next, clone the repo and move into the directory:

```sh
git clone https://github.com/ngrok/ngrok-docs.git
cd ngrok-docs
pnpm i && pnpm run start
```

Next, run:

```sh
direnv allow
```

This will install `nvm` (if not already installed) as well as set the correct `node` and `pnpm` versions for you.

Once you have the pre-requisites installed, local development happens by running:

```sh
pnpm run start
```

Our docs mostly use markdown and MDX, you can make yourself familiar with docusaurus [documentation](https://docusaurus.io/docs/en/installation) for more significant features / changes.
Expand Down
61 changes: 0 additions & 61 deletions flake.lock

This file was deleted.

34 changes: 0 additions & 34 deletions flake.nix

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ngrok-doc",
"version": "0.0.0",
"private": true,
"packageManager": "pnpm@8.0.0",
"packageManager": "pnpm@9.5.0",
"engines": {
"node": "^20.0.0"
},
Expand Down
Loading

0 comments on commit af11650

Please sign in to comment.