nest-cli icon indicating copy to clipboard operation
nest-cli copied to clipboard

[FEATURE] - Add Generator Root Path Location

Open Pekes317 opened this issue 8 years ago • 6 comments

It would be great if we could define where the generator creates files base on the templates.

Pekes317 avatar Jan 16 '18 01:01 Pekes317

Hey @Pekes317 Thanks for feedbacks. Can you explain how you need this feature works ?

thomrick avatar Jan 16 '18 07:01 thomrick

Sure, currently the Nest cli generates the templates in using a "src" folder as the root. Ex. "src/controllers/main/main.contoller.ts" It would nice to be able to change it to a different folder like "server" if the current "src" folder is being used for another component. Does that make sense?

Pekes317 avatar Jan 20 '18 04:01 Pekes317

Yeah totally !

If you want try to develop and make a PR about this cool feature ! ;-) Start from master that will be released very soon on v2.0.0-rc1.

thomrick avatar Jan 22 '18 08:01 thomrick

The CLI tool was rebuild from scratch and integrate schematics to generate assets. Please upgrade to v4.0.0-rc1

thomrick avatar Apr 01 '18 10:04 thomrick

Sorry but I did not understand if this feature was implemented? thks

mmenik avatar Jun 08 '18 14:06 mmenik

This may help some who modify their nestjs to create a nest-cli.json that already comes in a generated project if it is not added and change the sourceRoot by the desired one.

{ 
    "language": "ts", 
    "sourceRoot": "src" 
} 

iamsteeve avatar Jun 27 '19 16:06 iamsteeve