# nest-codegen

> Create nest modules from the cli

Latest version **0.1.8** (published 2022-12-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install nest-codegen
pnpm add nest-codegen
yarn add nest-codegen
bun add nest-codegen
```

Provides the command `nest-codegen`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2022-12-30 |
| First published | 2022-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 18.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Nacho ferrari |
| Maintainers | nachoferrari |
| Keywords | nestjs, nest, commands, service, repository, model, dto, entity |

## Links

- npm: https://www.npmjs.com/package/nest-codegen
- Repository: https://github.com/Nachoferra1894/nest-commands
- Homepage: https://github.com/Nachoferra1894/nest-commands#readme
- Issues: https://github.com/Nachoferra1894/nest-commands/issues
- npm.io page: https://npm.io/package/nest-codegen

## Dependencies (4)

- [fs](https://npm.io/package/fs.md) ^0.0.1-security
- [path](https://npm.io/package/path.md) ^0.12.7
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.5
- [commander](https://npm.io/package/commander.md) ^9.4.1

## Recent versions

- 0.1.8 (latest) — 2022-12-30
- 0.1.7 — 2022-12-30
- 0.1.6 — 2022-12-30
- 0.1.5 — 2022-12-30
- 0.1.4 — 2022-12-28
- 0.1.3 — 2022-12-28
- 0.1.2 — 2022-12-28
- 0.1.1 — 2022-12-28
- 0.1.0 — 2022-12-28

## README

# Nest code generator

## Description

<p>Create custom modules for your nest aplication using the CLI.<p/>
<p>Using the command:<p/>

```bash
$ nest-codegen generate module
```

Generates a dto and an entity inside the modules folder, and a folder inside your src module containing:

-   A repository folder, with index, a repository.interface and a repository
-   A service folder, with index, a service.interface and a service
-   A controller folder, with index, and a controller
-   A module file

<p>Using the command:<p/>

```bash
$ nest-codegen generate test
```

Generates a folder inside the provided directory with

-   A dummies folder, with a repository mocking common functions (complete for your custom ones)
-   A integration folder for e2e tests
-   A unit folder for testing controllers and services

## Installation

```bash
$ npm i -g nest-codegen
$ npm i --save nest-codegen
```

## Usage

```bash
$ nest-codegen generate module
? What is the name of the module? Insert-name-here
? Path to the code, or leave blank for src/ (src)
```

```bash
$ nest-codegen generate test
? What is the name of the test module? Insert-test-name-here
? Path to the code, or leave blank for test/ (test)
```

## Stay in touch

-   Author - [Nacho Ferrari](https://github.com/Nachoferra1894/Nachoferra1894/blob/main/README.md)

---
_Source: https://npm.io/package/nest-codegen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
