Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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.

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
```