From 0bd683fcfa974671ae4fac93a52e4a346bc83d33 Mon Sep 17 00:00:00 2001 From: Ethan Niser <100045248+ethanniser@users.noreply.github.com> Date: Thu, 16 Mar 2023 15:51:15 +0000 Subject: [PATCH] minor docs changes --- .changeset/hungry-timers-boil.md | 5 +++++ README.md | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .changeset/hungry-timers-boil.md diff --git a/.changeset/hungry-timers-boil.md b/.changeset/hungry-timers-boil.md new file mode 100644 index 0000000..b995d2a --- /dev/null +++ b/.changeset/hungry-timers-boil.md @@ -0,0 +1,5 @@ +--- +"next-typesafe-url": patch +--- + +docs: rephrase how potential cli issues worded + presented diff --git a/README.md b/README.md index 748383a..da50ce7 100644 --- a/README.md +++ b/README.md @@ -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.* --- @@ -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