From 0fb96bba61b0126bc6ee433a00116860b281a468 Mon Sep 17 00:00:00 2001 From: Wesley Luyten Date: Thu, 29 Feb 2024 06:49:42 -0600 Subject: [PATCH] docs(readme): fix up setup docs (#198) --- README.md | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index fb3fe2a..ce19dcb 100644 --- a/README.md +++ b/README.md @@ -25,25 +25,12 @@ export default function Page() { ## Setup -### Install the package +### Automatic Setup -```bash -cd your-next-app - -# If your project is using NPM (the default for Next.js) -npm install next-video - -# If your project is using Yarn -yarn add next-video - -# If your project is using pnpm -pnpm add next-video -``` - -### Run the init wizard +In the root of your Next.js project, run: ```bash -npx next-video init +npx -y next-video init ``` This will (with prompting): @@ -53,7 +40,7 @@ This will (with prompting): - if you're using TypeScript, add types for your video file imports - create a `/videos` directory in your project which is where you will put all video source files. -It will also add a .gitignore file to the `/videos` directory that ignores video files. Videos, particularly any of reasonable size, shouldn't be stored/tracked by git. Alternatively, if you'd like to store the original files you can remove the added gitignore lines and install [git-lfs](https://git-lfs.github.com/). +It will also update your `.gitignore` file to ignore video files in the `/videos` directory. Videos, particularly any of reasonable size, shouldn't be stored/tracked by git. Alternatively, if you'd like to store the original files you can remove the added gitignore lines and install [git-lfs](https://git-lfs.github.com/). ### Remote storage and optimization @@ -73,6 +60,21 @@ MUX_TOKEN_SECRET=[YOUR_TOKEN_SECRET] If you choose to do any of the init steps manually. +#### Install the package + +```bash +cd your-next-app + +# If your project is using NPM (the default for Next.js) +npm install next-video + +# If your project is using Yarn +yarn add next-video + +# If your project is using pnpm +pnpm add next-video +``` + #### Add Next Video to `next.config.js` ```js