npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng-tds-moduler

v0.0.1

Published

Angular Module Creator for TDSPLC

Downloads

3

Readme

For Version 1, check this readme.md

Articles associated

Medium 23/02/2018

Medium 10/12/2017

Intro

If you are a user of @ngrx libs, check this generator! This will help you to save time by creating an architecture for your ngrx files.

  • Create an entity is easy. Just provide a name and it will generate all the files!
  • Create a router-serializer to use @ngrx/router-store.
  • Provide a module to easily import all the reducers, effects and services in your Angular app.
  • MetaReducer: non-invasive logger in development.
  • Mainly inspired by the ngrx styleguide
  • Use the latest Angular HttpClient.
  • Use lettable operators in Rxjs.
  • Provide unit tests.

prerequisites

@ngrx/store@^5.0.0 // Required
@ngrx/effects@^5.0.1 // Required
@ngrx/entity@^5.0.1 // Optional but recommended. (Required if you generate entity)
ngrx-store-freeze // Optional but recommended. Useful to prevent state mutation.

Getting Started

Globally

Install it via npm:

npm install -g ngx-reduxor

or with Yarn:

yarn global add ngx-reduxor

Locally in a project

Install it via npm:

npm install ngx-reduxor --save-dev

or with Yarn:

yarn add --dev ngx-reduxor

Configuration

If you want to install it locally, you have to add the following in your package.json:

  ...
  "scripts": {
    "ngx-reduxor": "ngx-reduxor"
  },

If installed globally, you can directly use the Generator like the Angular CLI. The first time you launch the generator, it will create a new file for the configuration:

| Option | Description | Type | Default | |--------------------|-------------------------------------------------------------------------|---------|-------------------| | BASE_PATH | Path to put the generated files | String | './src/app/store' | | SEPARATE_DIRECTORY | If true, separate each action, reducer, service,... In their own folder | Boolean | false | | IGNORE_SPEC | If true, skip generation of spec files | Boolean | false |

Usage

You need to use the generator at the root of your project.

If installed globally:

ngx-reduxor

Otherwise:

npm run ngx-reduxor

Import to your Angular application

A module is created once you generate your first ngrx files. This module contains all the necessary: Reducers, interfaces, meta-reducers, effects,... You just need to import the module inside the AppModule and it will expose the store in your application.

...
import { StoreReduxorModule } from './path/to/your/store-reduxor.module';
...
@NgModule({
...
imports: [
  ...
  StoreReduxorModule.forRoot(),
  ...
]
...

Generate Entity

If you want to generate an entity, you need to provide the singular of the name. After, you will be asked to provide the plural of this name in order to correctly generate the files.

Generate router-serializer

To use this feature:

  • You firstly need to generate your first store object. So that, the module and the required files (app.store,...) are created.
  • Ensure you have @ngrx/router-store installed in your project and existing in your package.json.

If these two conditions are met, you will be able to generate the router-serializer (it also update store-reduxor.module and app.store with routerReducer ect)

Contributors

Special thanks to contributors for their hard work!! 🙏 Do you want to contribute? Check the Contributor Guide

Issues/Improvements

Don't hesitate to send a PR or to contribute to this project. If you have suggestion or a problem, feel free to open an issue.