@compgen/nest
v0.3.8
Published
A robust generator for generating full Nest.js project.
Downloads
21
Readme
@compgen/nest
A robust generator for generating full Nest.js project.
Micro Generators Included
- @compgen/nest-min
- @compgen/editor-config
- @compgen/eslint
- @compgen/prettier
- @compgen/git-hooks
- @compgen/heroku
CLI
I highly recommend using npx
so that you don't have to install anything globally, and you can always get the latest version from npm.
- optional
--path=target_folder
npx @compgen/nest
Programmatically
You have to generate JSON schema and use execute
function from @compgen/core
:
// src/index.ts
import { execute, askProjectName, askYesNo } from '@compgen/core'
import { createSchema } from '@compgen/nest'
const generate = async () => {
const { projectFolder } = await askProjectName()
const isDatabase = await askYesNo('Do you want to setup database?')
const isHeroku = await askYesNo('Do you want to generate Heroku configuration?')
const schema = createSchema({ projectFolder, isHeroku, isDatabase })
await execute(schema, projectFolder)
}
generate()
Now all you have to do is run:
ts-node src/index.ts