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

load collection path from nest-cli.json #954

Closed
taozhiyuzhuo opened this issue Nov 19, 2020 · 8 comments
Closed

load collection path from nest-cli.json #954

taozhiyuzhuo opened this issue Nov 19, 2020 · 8 comments

Comments

@taozhiyuzhuo
Copy link

taozhiyuzhuo commented Nov 19, 2020

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

collection default value is @nestjs/schematics. if we want to use custom schematics. I must execute nest g -c custom/schematics

Expected behavior

  • nest cli can load custom schematics path from nest-cli.json. if I set the "collection": "@custom/schematics"
    when I execute nest g it can load my custom schematics
  • it should be better if it can merge my custom schematics to @nestjs/schematics.

What is the motivation / use case for changing the behavior?

Generate files by custom schematics more convenient

@kamilmysliwiec
Copy link
Member

nest cli can load custom schematics path from nest-cli.json. if I set the "collection": "@custom/schematics"
when I execute nest g it can load my custom schematics

Setting "collection": "@custom/schematics". Does it not work for you?

@taozhiyuzhuo
Copy link
Author

nest cli can load custom schematics path from nest-cli.json. if I set the "collection": "@custom/schematics"
when I execute nest g it can load my custom schematics

Setting "collection": "@custom/schematics". Does it not work for you?

yes, it does not work. always use @nestjs/schematics

@kamilmysliwiec
Copy link
Member

Would you like to create a PR for this issue?

taozhiyuzhuo pushed a commit to taozhiyuzhuo/nest-cli that referenced this issue Nov 19, 2020
@taozhiyuzhuo
Copy link
Author

taozhiyuzhuo commented Nov 19, 2020

Would you like to create a PR for this issue?

sorry for the response you late. is that PR ok?

@rthomps7
Copy link

rthomps7 commented Jan 5, 2021

@kamilmysliwiec

I don't think this PR is really what you need because t makes it so the nest-cli.json configuration will always override the CLI. What we realy need is the Collection.NESTJS fallback here to pull from the nest-cli.json

@kamilmysliwiec
Copy link
Member

@rthomps7 would you like to create a PR with a fix?

@ledniy
Copy link
Contributor

ledniy commented May 11, 2021

Hi, @kamilmysliwiec could you review PR #1166 that addressing that issue? Generally, I've used @rthomps7 suggestion and it worked.

@kamilmysliwiec
Copy link
Member

Let's track this here #1166

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

No branches or pull requests

4 participants