#How can I customize `nest g` commands?

4 messages · Page 1 of 1 (latest)

torn inlet
#

Is there a way to customize the files that nest g will generate by default?
I'm using Vitest and am experimenting with the in-source testing. I want to remove the default .spec.ts files and add tests to the bottom of the files.
I see there's reference to something called schematics in the docs but I don't see any guide on how to customize them.

ember axle
#

You'd have to make your own schematics to do that. Nest uses angular schematics for the g command, so you can make those as you wish

umbral glen
#

and then use it by default by changing the collection prop of your nest-cli.json

torn inlet
#

Okay I'll look into that.