Setup
INSTALLATION
install the package
npm install -g @samagra-x/stencil-cli
USAGE
The alias for the nest-cli has been changed to stencil. So, all the commands available with the nest-cli are available.
Bootstrap a new project
stencil new app-name
Options available while bootstrapping a project
In addition to the standard options included, the extra options available are:
prisma: This is a required option with yes/no as acceptable options. On checking this option, the cli does the following tasks-- installs the
prismamodule and@prisma/clientlibrary - runs the
npx prisma initcommand to generate a standardschema.prismafile - Creates the
prisma.service.tsfile and importsPrismaServicein theapp.module.ts - Adds a sample
Usermodel to theschema.prismafile - Runs
npx prisma generatecommand to generate the TypeScript types
- installs the
user-service: This is a required option with yes/no as acceptable options. On checking this option, the cli does the following tasks-- installs the
@techsavvyash/user-servicelibrary - adds an import statement to
app.module.tsfileimport { user } from '@techsavvyash/user-service';. - additionally, in the
app.module.tsfile, it adds an import ofuser.UserModuleto theimportsarray
- installs the
Additional tasks performed by the cli
If use dont have dry-run enabled, then the cli generates Fixture files
In this, the cli does the following:
- Runs the
npx husky installcommand - Generates the
pre-commitfile in./huskyfolder - Genrates all the docker related files and the the
.shfiles required by husky - Generates the
.githubfolder withISSUE_TEMPLATEandworkflowssub-directories - Generates the
.devcontainerfolder withdevcontainer.jsonfile
Future Scope
- Integrate
nestjs-monitoras an npm package - Logging with
axiomandELK-stack