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

react-redux-ducks-structure-generator

v2.0.0

Published

React with Redux code generator using Yeoman

Downloads

6

Readme

React & Redux Duck Structure Generator

A Yeoman generator for React & Redux for projects basing on the ducks structure structured on routes.

This generator works for vertically integrated React and Redux projects. The sub-generator will create modules/features for you with a smaller version of the ducks structure. Each module is self-contained.

Installation

Yeoman

For this generator to work, Yeoman must be globally installed.

npm install -g yo

Then you can install this react-redux-duck-structure-generator module.

npm install -g react-redux-duck-structure-generator

Base Generator

Creates the base project. Loosely based off React-starter-kit. The entrie app is not ducks structure yet.

yo react-redux-duck-structure-generator

This will compile base files, including the Source, and Tools folders. (tests pending)

Options

| Option | Description | Default | | ------ | ----------- | ------- | | -h, --help | Print the generator's options and usage | | | --skip-cache | Do not remember prompt answers | Default: false | | --skip-install | Do not automatically install dependencies | Default: false |

Sub-generators

The sub generators assumes you already have a project up and running. They are to help you through developing new modules, components, etc.

Module

When you need to start creating new modules/features, simple use the sub-generator module.

yo react-redux-duck-structure-generator:module [options] <moduleName>

Within the module sub-generator, the following default files are generated for you. Replace with your own module name.

Options

| Option | Description | Default | | ------ | ----------- | ------- | | -h, --help | Print the generator's options and usage | | | --skip-cache | Do not remember prompt answers | Default: false | | --skip-install | Do not automatically install dependencies | Default: false |

Arguments

| Arguments | Description | Type | Required | | ----------- | ----------- | ---- | -------- | | moduleName | Name of the module | String | true |

Examples

The following command will generate the following:

yo react-redux-modules:module auth
# Generates the auth folder feature with all necessary files

Component

If you want to create a component other modules depend on, this sub-generator will create the files needed for you.

Within the component sub-generator, the following default files are generated for you. Replace #{CommonComponentName} with your own module name.

.
└── src
    └── common
        └── components
             └── CommonComponentName
                 ├── CommonComponentName.js
                 ├── CommonComponentName.scss
                 └── package.json

Arguments

| Arguments | Description | Type | Required | | -------------- | ------------------ | ------ | -------- | | componentName | Name of the module | String | true | | componentRoot | Name of the module | String | true |

Options

| Option | Description | Default | | ------ | ----------- | ------- | | -h, --help | Print the generator's options and usage | | | --skip-cache | Do not remember prompt answers | Default: false | | --skip-install | Do not automatically install dependencies | Default: false | | --raw | Use user input raw format for component name | Default: false |

Examples

The following command will generate the following:

yo react-redux-modules:component TextBox ./src/common/components --raw
# Generates the following:
.
└── src
    └── common
        └── components
             └── TextBox
                 ├── TextBox.js
                 ├── TextBox.scss
                 └── package.json

Action Test

If you want to generate an action test, for a known module, this sub-generator will help.

Within the component sub-generator, the following default files are generated for you.

Replace #{module} and #{action} with your own module and action names.

.
└── test
    └── unit
        └── module
             └── actions
                 └── action.spec.js

Arguments

| Arguments | Description | Type | Required | | -------------- | ------------------ | ------ | -------- | | module | Name of the module | String | true | | action | Name of the action | String | true |

Examples

The following command will generate the following:

yo react-redux-modules:actionTests Analytics Partners

# Generates the following:
.
└── test
    └── unit
        └── Analytics
            └── actions
                └── Partners.spec.js