1.0.1 • Published 5 years ago

babel-plugin-s2s-reducer-root v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

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'
1.0.1

5 years ago

1.0.0

5 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago