@kumanu/bloc

1.0.4 • Public • Published

BLoC Schematic Generator for Angular

This Schematic implementation defines schematics for the BLoC (Business Logic Component) pattern for use in Angular applications.

Installation

npm install @kumanu/bloc

Usage

ng g @kumanu/bloc:bloc [name*] [eventType] [requestType] [initialValue]

Parameters:

  • name (*required)
  • eventType - incoming event stream data type (defaults to T which must be replaced)
  • requestType - outgoing state stream data type (defaults to T which must be replaced)
  • initialValue - sets an initial value for the outgoing state stream (defaults to null)

Testing

This schematic cannot be tested locally, it must be tested from within an Angular application.

Unit Testing

npm run test will run the unit tests, using Jasmine as a runner and test framework.

Publishing

To publish, simply do:

npm run build
npm publish

That's it!

More Information, Resources

Readme

Keywords

Package Sidebar

Install

npm i @kumanu/bloc

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

12.8 kB

Total Files

14

Last publish

Collaborators

  • mike.behnke
  • kumanudev