Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/johurul-haque/next-dir
- Owner: johurul-haque
- Created: 2024-04-26T06:56:40.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-29T11:45:15.000Z (7 months ago)
- Last Synced: 2024-09-02T21:48:32.195Z (2 months ago)
- Topics: app-router, nextjs, route-segment
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/next-dir
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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-dirnext-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.