Skip to content

Commit

Permalink
docs(readme): fix up setup docs (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes authored Feb 29, 2024
1 parent e6daa24 commit 0fb96bb
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 0fb96bb

Please sign in to comment.