Skip to content

Commit

Permalink
Update container saga generator
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr committed May 15, 2016
1 parent 191b453 commit 575e92b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 9 additions & 2 deletions internals/generators/container/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ module.exports = {
type: 'confirm',
name: 'wantActionsAndReducer',
default: true,
message: 'Do you want an actions/constants/selectors/reducer/sagas tupel for this container?',
message: 'Do you want an actions/constants/selectors/reducer tupel for this container?',
}, {
type: 'confirm',
name: 'wantSagas',
default: true,
message: 'Do you want sagas for asynchronous flows? (e.g. fetching data)',
}],
actions: data => {
// Generate index.js and index.test.js
Expand Down Expand Up @@ -117,8 +122,10 @@ module.exports = {
pattern: /(export default function createReducer)/gi,
template: 'import {{camelCase name}}Reducer from \'containers/{{properCase name}}/reducer\';\n$1',
});
}

// Sagas
// Sagas
if (data.wantSagas) {
actions.push({
type: 'add',
path: '../../app/containers/{{properCase name}}/sagas.js',
Expand Down
1 change: 0 additions & 1 deletion internals/generators/container/sagas.test.js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { defaultSaga } from '../sagas';
const generator = defaultSaga();

describe('defaultSaga Saga', () => {

it('should .....', () => {

});
Expand Down

0 comments on commit 575e92b

Please sign in to comment.