New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ng-layer-generator

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-layer-generator

Schmatic for layered architecture

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

npm version

ng-layer-generator

This package is enable you to create files for layered architecture like usecase, query, repository and so on when developing Angular application.
Files made by this package have same construction as service which is made by ng generate service, so they are injectable by any components or classes.
This package is made with Schmatics.

Install

if you use yarn

yarn add @angular-devkit/schematics-cli -D
yarn add ng-layer-generator -D

if you use npm

npm i @angular-devkit/schematics-cli -g
npm i ng-layer-generator --save-dev -g

Usage

yarn ng-lg

or

ng-lg

then start interpreter

Please enter a name: sample
Please enter a type name(ex: repository, usecase, query and so on): usecase
Please enter a path name(where to generate file): usecases
Please enter a project name(which project to generate file): (not necessary)

then, /src/app/usecases/sample.usecase.spec.ts and /src/app/usecases/sample.usecase.ts are created.

file's contents are as follows.

// /src/app/usecases/sample.usecase.ts
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class SampleUsecase {
  constructor() {}
}
// /src/app/usecases/sample.usecase.spec.ts
import { TestBed } from '@angular/core/testing';

import { SampleUsecase } from './sample.usecase';

describe('SampleUsecase', () => {
  beforeEach(() => TestBed.configureTestingModule({}));

  it('should be created', () => {
    const type: SampleUsecase = TestBed.get(SampleUsecase);
    expect(type).toBeTruthy();
  });
});

options

optiondescriptionnecessary
namefile and class nametrue
typefile and class type (ex. usecase, query, repository, or anything)true
pathpath to generate filefalse
projectwhich project to generate file (if you use angular multiple projects)false

Keywords

schematics

FAQs

Package last updated on 22 Mar 2020

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