mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-10-29 13:11:10 +08:00
add 'architecture' question, Reflux option, and related store and actionCreator
This commit is contained in:
1 parent
356df8ec9a
commit
f7bb3c2b80
15 files changed
+107
-42
No files matched your search
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var assign = require('object-assign');
|
||||
var <%= dispatcherName %> = require('../dispatcher/<%= dispatcherName %>');
|
||||
|
||||
var <%= classedName %> = assign({}, EventEmitter.prototype, {
|
||||
|
||||
});
|
||||
|
||||
<%= classedName %>.dispatchToken = <%= dispatcherName %>.register(function(action) {
|
||||
|
||||
switch(action.type) {
|
||||
default:
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
<% if (es6) { %> export default <%= classedName %>; <% }
|
||||
else { %>module.exports = <%= classedName %>; <% } %>
|
||||
Reference in new issue
Block a user