babel-plugin-create-redux-action-type

0.1.2 • Public • Published

babel-plugin-create-redux-action-type Build Status

create redux action type constants

Install

yarn

$ yarn add --dev babel-plugin-create-redux-action-type

npm

$ npm install --save-dev babel-plugin-create-redux-action-type

Example

In:

/* @flow */
type HOGE_TYPE = 'hoge/HOGE_ACTION'
type FUGA_TYPE = 'fuga/FUGA_ACTION'

type Action = { +type: HOGE_TYPE | HUGA_TYPE }

Out:

// @flow
import type { HOGE_TYPE, FUGA_TYPE } from './actionTypes';

export const HOGE: HOGE_TYPE = 'hoge/HOGE_ACTION';
export const FUGA: FUGA_TYPE = 'fuga/FUGA_ACTION';"

Usage

{
  "plugins": [
    "create-redux-action-type"
  ]
}

License

MIT © akameco

Package Sidebar

Install

npm i babel-plugin-create-redux-action-type

Weekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • akameco