-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paths2s.tutorial.config.js
66 lines (65 loc) · 1.72 KB
/
s2s.tutorial.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const handlerBabelSpread = require('s2s-handler-babel-object-rest-spread').default
module.exports = {
watch: './**/*.js',
plugins: [
{
test: /src\/actions\/(?!.*index).*\.js/,
plugin: ['s2s-redux-actions']
},
{
test: /src\/actions\/(?!.*index).*\.js/,
output: "index.js",
plugin: ['s2s-redux-actions-root',
{ input: 'src/actions/*.js', output: "src/actions/index.js" }]
},
{
test: /src\/reducers\/(?!.*index).*\.js/,
handler: handlerBabelSpread,
plugin: ['s2s-redux-actions-reducers']
},
{
test: /src\/reducers\/(?!.*index).*\.js/,
output: "index.js",
handler: handlerBabelSpread,
plugin: ['s2s-redux-actions-reducers-root',
{ input: 'src/reducers/*.js', output: "src/reducers/index.js",router: true }]
},
{
test: /src\/sagas\/(?!.*index).*\.js/,
plugin: ['s2s-redux-sagas']
},
{
test: /src\/sagas\/(?!.*index).*\.js/,
output: "index.js",
plugin: ['s2s-redux-sagas-root',
{ input: 'src/sagas/*.js', output: "src/sagas/index.js" }]
},
{
test: /src\/api\/(?!.*index).*\.js/,
plugin: ['s2s-axios-api']
},
{
test: /src\/api\/(?!.*index).*\.js/,
output: "index.js",
plugin: ['s2s-axios-api-root',
{ input: 'src/api/*.js', output: "src/api/index.js" }]
}
],
templates: [
{
test: /src\/actions\/.*\.js/, input: 'redux-action.js'
},
{
test: /src\/reducers\/.*\.js/, input: 'reducer.js'
},
{
test: /src\/sagas\/.*\.js/, input: 'saga.js'
},
{
test: /src\/containers\/.*\.js/, input: 'container.js'
},
{
test: /src\/api\/.*\.js/, input: 'axios-api.js'
}
]
}