Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/williamlmao/next-gpa
Configures path aliases for all of the folders in your Next app.
https://github.com/williamlmao/next-gpa
Last synced: 27 days ago
JSON representation
Configures path aliases for all of the folders in your Next app.
- Host: GitHub
- URL: https://github.com/williamlmao/next-gpa
- Owner: williamlmao
- Created: 2022-09-02T22:34:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-02T22:43:35.000Z (over 2 years ago)
- Last Synced: 2024-11-14T22:09:04.784Z (about 1 month ago)
- Language: JavaScript
- Size: 393 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# next-gpa (Generate Path Aliases)
Module path aliases are great for writing cleaner imports. You can read about them [here in the Next.js docs](https://nextjs.org/docs/advanced-features/module-path-aliases). This package, next-gpa, configures them for you automatically.
# Installation
(Global install recommended)
`npm i -g next-gpa`
# Usage
In the root directory of your Next.js project, run `npx next-gpa`. This will add every subdirectory contained in root directory as a module path alias.
# Ignoring directories
By default, next-gpa ignores the following folders:
- node_modules
- dist
- build
- any folder that contains a "."If you want to ignore additional directories, use add the `--ignore` flag and list any directories after that.
```
npx next-gpa --ignore public styles utils
```