Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/johurul-haque/next-dir

CLI tool for adding route-segments in NextJs projects.
https://github.com/johurul-haque/next-dir

app-router nextjs route-segment

Last synced: 5 days ago
JSON representation

CLI tool for adding route-segments in NextJs projects.

Awesome Lists containing this project

README

        

# next-dir
CLI tool for creating route segments in NextJs projects.

## Quick start

Run the command at the root of your project.
```bash
npx next-dir [directory-name]
```

Or if you prefer installing it globally
```bash
npm i -g next-dir

next-dir [directory-name]
```

This command will create a directory with the following files inside the app directory.

```ini
├── page.tsx
├── layout.tsx
└── loading.tsx # Optional, specify using the --lg flag
```

### CLI Options
- `directory-name`: Defines the folder name.

- `--lg`: Optional flag for including `loading.tsx` file.