Created
September 26, 2016 10:01
-
-
Save sorrycc/72565f379a2f773dc543fa8cbe505daf to your computer and use it in GitHub Desktop.
dva-ast-result
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"models": { | |
"list": [ | |
{ | |
"reducers": [ | |
"Reducer^^./a/c.js^^add", | |
"Reducer^^./a/c.js^^minus" | |
], | |
"effects": [ | |
"Effect^^./a/c.js^^addRemote" | |
], | |
"subscriptions": [ | |
"Subscription^^./a/c.js^^setup" | |
], | |
"namespace": "count", | |
"state": 0, | |
"id": "Model^^./a/c.js^^count", | |
"filePath": "./a/c.js" | |
} | |
], | |
"reducerByIds": { | |
"Reducer^^./a/c.js^^add": { | |
"name": "add", | |
"source": "function(state) { return state + 1; }", | |
"id": "Reducer^^./a/c.js^^add", | |
"filePath": "./a/c.js" | |
}, | |
"Reducer^^./a/c.js^^minus": { | |
"name": "minus", | |
"source": "function(state) { return state - 1; }", | |
"id": "Reducer^^./a/c.js^^minus", | |
"filePath": "./a/c.js" | |
} | |
}, | |
"effectByIds": { | |
"Effect^^./a/c.js^^addRemote": { | |
"name": "addRemote", | |
"source": "function*() { yield put({ type: 'add' }); }", | |
"dispatches": [ | |
"count/add" | |
], | |
"id": "Effect^^./a/c.js^^addRemote", | |
"filePath": "./a/c.js" | |
} | |
}, | |
"subscriptionByIds": { | |
"Subscription^^./a/c.js^^setup": { | |
"name": "setup", | |
"source": "function() {\n dispatch({ type:'app/showLoading' });\n dispatch({ type:'addRemote' });\n}", | |
"dispatches": [ | |
"app/showLoading", | |
"count/addRemote" | |
], | |
"id": "Subscription^^./a/c.js^^setup", | |
"filePath": "./a/c.js" | |
} | |
} | |
}, | |
"router": { | |
"type": "Router", | |
"attributes": { | |
"history": "history" | |
}, | |
"id": "Router-root", | |
"children": [ | |
{ | |
"type": "Route", | |
"attributes": { | |
"path": "/", | |
"component": "AppPage" | |
}, | |
"absolutePath": "/", | |
"id": "Route-/", | |
"children": [] | |
} | |
], | |
"filePath": "./a/c.js" | |
}, | |
"routeComponents": [ | |
{ | |
"name": "Component", | |
"stateMappings": [ | |
"count" | |
], | |
"dispatches": [ | |
"count/minus" | |
], | |
"filepath": "./a/c.js", | |
"id": "RouteComponent^^./a/c.js^^Component" | |
} | |
], | |
"dispatches": { | |
"count/minus": { | |
"input": [ | |
"RouteComponent^^./a/c.js^^Component" | |
], | |
"output": [ | |
"Reducer^^./a/c.js^^minus" | |
] | |
}, | |
"count/add": { | |
"input": [ | |
"Effect^^./a/c.js^^addRemote" | |
], | |
"output": [ | |
"Reducer^^./a/c.js^^add" | |
] | |
}, | |
"count/addRemote": { | |
"input": [ | |
"Subscription^^./a/c.js^^setup" | |
], | |
"output": [ | |
"Effect^^./a/c.js^^addRemote" | |
] | |
}, | |
"app/showLoading": { | |
"input": [ | |
"Subscription^^./a/c.js^^setup" | |
], | |
"output": [] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
整理下变动点:
类型+文件相对路径+name
,以^^
分隔data
,reducersById
,effectsById
,subscriptionsById
,都放在 models 下是为了后面加入修改机制后便于修改