Skip to content

Commit

Permalink
minor docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanniser committed Mar 16, 2023
1 parent ff82eb1 commit 0bd683f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-timers-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"next-typesafe-url": patch
---

docs: rephrase how potential cli issues worded + presented
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,17 @@ pnpm add next-typesafe-url

## Setup

### IMPORTANT NOTE

**This package requires you to run your npm scripts from the root directory of your project, as well as your `pages` directory being in `root/src`.**

---

**Note:** This package requires you to run your npm scripts from the root directory of your project, as well as your `pages` directory being in `root/src`.
If you run into any issues it will most likely be the cli (*for me it works fine on my setup, but when using it in a github codespace the watch functionality wouldn't work*).

**Assuming you have the correct directory structure as listed above**, a quick `npx next-typesafe-url` should generate the types and you'll be all set.

*If the functions still show type errors, you can restart typescript server, but I have found a quick `crtl+click` to go the origin type file can often wake the ts server up much faster.*

---

Expand All @@ -62,10 +70,6 @@ For dev mode, you can either run it in a seperate shell, or in one with the [con
}
```

### IMPORTANT NOTE

The cli is probably the most likely part to _slightly_ break. If you run into issues just run a quick `npx next-typesafe-url` and it should generate the types. If the functions still show type errors, you can restart typescript server, but I have found a quick `crtl+click` to go the origin type file can often wake the ts server up much faster.

# Usage

## Route
Expand Down

0 comments on commit 0bd683f

Please sign in to comment.