0.1.0 • Published 6 years ago
babel-plugin-s2s-d-action-constants v0.1.0
babel-plugin-s2s-d-action-constants
s2s plugin for
d
Install
$ yarn add --dev babel-plugin-s2s-d-action-constants
Example
IN:
// @flow
export type Action = Increment | Decrement
OUT:
// @flow
export const INCREMENT: 'INCREMENT' = 'INCREMENT'
export const DECREMENT: 'DECREMENT' = 'DECREMENT'
With prefix
export S2S_ACTION_CONSTANTS_PREFIX=app
// @flow
export type Action = Increment | Decrement
OUT:
// @flow
export const INCREMENT: 'app/INCREMENT' = 'app/INCREMENT'
export const DECREMENT: 'app/DECREMENT' = 'app/DECREMENT'
Usage
{
['s2s-d-action-constants']
}
0.1.0
6 years ago