1 | # babel-plugin-s2s-action-root
|
2 |
|
3 | > compose action types
|
4 |
|
5 |
|
6 | ## Install
|
7 |
|
8 | ```
|
9 | $ npm install --save-dev babel-plugin-s2s-action-root
|
10 | ```
|
11 |
|
12 | ### Example
|
13 |
|
14 | #### IN:
|
15 |
|
16 | ```
|
17 | ```
|
18 |
|
19 |
|
20 | #### OUT:
|
21 |
|
22 | ```
|
23 | // @flow
|
24 | import type { Action as AppAction } from "../app/actionTypes";
|
25 | import type { Action as BobAction } from "../bob/actionTypes";
|
26 |
|
27 | export type Action = AppAction | BobAction;
|
28 | ```
|
29 |
|
30 |
|
31 | ### Usage
|
32 |
|
33 | ```
|
34 | {
|
35 | ['s2s-action-root', {
|
36 | input: 'containers/**/actionTypes.js',
|
37 | output: 'types/action.js',
|
38 | globOptions: {}
|
39 | }]
|
40 | }
|
41 | ```
|
42 |
|
43 | #### input
|
44 |
|
45 | type: `string` <br>
|
46 | required: true
|
47 |
|
48 | glob pattern.
|
49 |
|
50 | #### output
|
51 |
|
52 | type: `string` <br>
|
53 | required: true
|
54 |
|
55 | outputh path.
|
56 |
|
57 | #### blobOptions
|
58 |
|
59 | See https://github.com/isaacs/node-glob#options
|