Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nestjs-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-cli

[![Nest Logo](http://kamilmysliwiec.com/public/nest-logo.png)](http://kamilmysliwiec.com/)

  • 1.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-84.37%
Maintainers
1
Weekly downloads
 
Created
Source

Nest Logo

WARNING: The CLI is still a work in progress and is not ready for practical use. The repository is created to allow for insight and contributions.

Nest CLI

Join the chat at https://gitter.im/nestjs/nest-cli Build Status Known Vulnerabilities Coverage Status License: MIT

Installation

Git :

$ git clone https://github.com/nestjs/nest-cli.git <project>
$ cd <project>
$ npm install
$ npm link

###npm (not registered)

nestconfig.json (not implemented)

While the CLI does not require a nestconfig.json file to work, default values can be overrided by implementing one. Currently, a nestconfig.json file is only the following:

{
    "language": "ts | es (default: ts)"
}

Commands

new

Examples :

  • $ nest new my-app
  • $ nest new my-app myapp/
  • $ nest new my-app --repo https://github.com/ThomRick/nest-typescript-starter Creates a new Nest application by cloning https://github.com/ThomRick/nest-typescript-starter Git repository.

generate (or g)

module

Example :

  • $ nest generate module path/to/<name>
  • $ nest g module path/to/<name> Creates a templated module file :
  • src/path/to/<name>/<name>.module.ts
@Module({})
export class NameModule {}
controller

Examples :

  • $ nest generate controller path/to/<name>
  • $ nest g controller path/to/<name> Creates a templated controller files :
  • src/path/to/<name>/<name>.controller.ts
@Controller()
export class NameController {
    public constructor() {}
}
  • src/path/to/<name>/<name>.controller.spec.ts
import {NameController} from './name.controller';
import {expect} from 'chai';

describe('NameController', () => {
    const controller: NameController;

    beforeEach(() => {
        Test.createTestingModule({
            controllers: [
                NameController
            ]
        });

        controller = Test.get(NameController);
    });

    it('should exists', () => {
        expect(controller).to.exist;
    });
}
component

Examples :

  • $ nest generate component path/to/<name>
  • $ nest g component path/to/<name> Creates a templated component files :
  • src/path/to/<name>/<name>.service.ts
@Component()
export class NameService {
    constructor() {}
}
  • src/path/to/<name>/<name>.service.spec.ts
import {NameService} from './name.service';
import {expect} from 'chai';

describe('NameService', () => {
    const service: NameService;

    beforeEach(() => {
        Test.createTestingModule({
            components: [
                NameService
            ]
        });

        service = Test.get(NameService);
    });

    it('should exists', () => {
        expect(service).to.exist;
    });
}

serve (not implemented)

build (not implemented)

FAQs

Package last updated on 21 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc