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

ngrx-command-line-logger

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngrx-command-line-logger

Print in the terminal your project NGRX actions via websockets.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Ngrx Command Line Logger

Print in the terminal your project NGRX actions via websockets.

Example action

Installing

$ npm i --save-dev ngrx-command-line-logger

Usage

Add ngrx-command-line-logger as ngrx meta-reducer.

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { StoreModule } from '@ngrx/store';
import { reducers, metaReducers } from './reducers';
import { environment } from '../environments/environment';
import { CommandLineLogger } from 'ngrx-command-line-logger';

export const metaReducers: MetaReducer<State>[] = !environment.production ? [] : [];

metaReducers.push(CommandLineLogger({
  port: 8080 // default
}));

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    StoreModule.forRoot(reducers, {
      metaReducers
    })
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Run the repl logger

$ npx ngrx-cll --port 8080

REPL

$.client({}): Send an object to the client devtools.

> $.client($.history)
> $.client() // last state

Example client command

$.history: Last 100 entries (state, action & diff).

$.last: Last entry.

$.state: Current state.

$.log({}): Deep JSON log. Example: $.log($.state)

Keywords

FAQs

Package last updated on 15 Aug 2019

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