babel-plugin-s2s-reducer-root

1.0.1 • Public • Published

babel-plugin-s2s-reducer-root

s2s plugin: compose state types

Install

$ npm install --save-dev babel-plugin-s2s-reducer-root

Example

IN:


OUT:

// @flow
import { combineReducers } from 'redux';
import App from "../__fixtures__/app/reducer";
import Bob from "../__fixtures__/bob/reducer";

export default combineReducers({
  App,
  Bob
});

Usage

{
  ['s2s-reducer-root', {
    input: 'containers/**/reducer.js',
    output: 'reducer.js',
    globOptions: {}
  }]
}

input

type: string
required: true

glob pattern.

output

type: string
required: true

outputh path.

globOptions

type: Object
default: {}

See https://github.com/isaacs/node-glob#options

combineReducers

type: string
required: false
defualt: "redux"

If you need customized combineReducers like redux-persist, set that path or module name.

{
  ['s2s-reducer-root', { combineReducers: './path/to/yourCombineReducers'}]
}

Output:

import { combineReducers } from './path/to/yourCombineReducers'

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-s2s-reducer-root

Weekly Downloads

16

Version

1.0.1

License

MIT

Unpacked Size

8.81 kB

Total Files

6

Last publish

Collaborators

  • akameco