Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 CLI: specify path to nextjs application (CI / Monorepo) #180

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

splacentino
Copy link

In order to generate types for a specific project from root of a monorepo during CI, a subfolder should be specified.

E.g. package.json:

"codegen:routes:frontend": "nextjs-routes apps/frontend",
"codegen:routes:frontoffice": "nextjs-routes apps/frontoffice"

Arguments could be handled in a better way (commander, arguments validation, ...) but this currently works.

In order to generate types for a specific project from root of a monorepo during CI, a subfolder should be specified.

E.g. `package.json`: 
```json
"codegen:routes:frontend": "nextjs-routes apps/frontend"
```
@tatethurston
Copy link
Owner

@splacentino any particular reason you’re using the cli instead of next build? Using next build will handle this case already.

@splacentino
Copy link
Author

splacentino commented Dec 2, 2023

@splacentino any particular reason you’re using the cli instead of next build? Using next build will handle this case already.

Some checks (linting, ..) do not require build step.

Also I have a separated script for multiples codegen w/ different CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants