1.0.3 ā€¢ Published 11 months ago

plop-generator-ngxs-store v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

šŸ’§ plop generator ngxs store

version downloads size

A plop generator for allowing easily create slices of state for ngxs state management pattern + library for Angular.

This package aims to follow closely the ngxs style guide .

šŸ“¦ Installation

This package is hosted on npm.

npm install --save-dev plop-generator-ngxs-store

šŸ„‘ Usage

First, be sure you have plop installed. Then, add the following line to your plopfile.js.

plop.load("plop-generator-ngxs-store");

A minimal plopfile.js can be

module.exports = (plop) => plop.load('plop-generator-ngxs-store');

Now you'll have access to the store generator as shown below.

> plop

? store name (examples: HelloWorld, hello-world): HelloWorld

The store generator scaffolds ngxs slice of state. Generated files include actions .actions.ts, default state model .constant.ts, selectors .selector.ts, state .state.ts, tests for the state .state.spec.ts and state model .types.ts. Tests are written in jest. All the generated files are exported via index.ts file for easy importing.

src
ā””ā”€ā”€ store
   ā”œā”€ā”€ index.ts
   ā””ā”€ā”€ hello-world.actions.ts
   ā””ā”€ā”€ hello-world.constant.ts
   ā””ā”€ā”€ hello-world.selector.ts
   ā””ā”€ā”€ hello-world.state.ts
   ā””ā”€ā”€ hello-world.state.spec.ts
   ā””ā”€ā”€ hello-world.types.ts

ā” Questions

šŸ› report bugs by filing issues
šŸ“¢ provide feedback with issues or on twitter

1.0.3

11 months ago

1.0.2

11 months ago

1.0.0-alpha.3

11 months ago

1.0.0-alpha.2

11 months ago

1.0.0

11 months ago