Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cd src/app/state/ducks
- mkdir $1
- cd $1
- printf "
- import axios from 'axios';
- import actions from './actions';
- export default {
- };" > operations.js
- printf "
- import types from './types';
- const = (payload) => ({
- type: ,
- payload,
- });
- export default {
- };" > actions.js
- printf "
- import { combineReducers } from 'redux';
- import cloneDeep from 'lodash/cloneDeep';
- import types from './types';
- import operations from './operations';
- import actions from './actions';
- const = (state = null, { type, payload }) => {
- let newState = cloneDeep(state);
- switch (type) {
- case :
- break;
- default:
- break;
- }
- return newState;
- };
- export default combineReducers({
- });" > reducers.js
- printf "
- export default {
- };" > types.js
- printf "
- import reducers from './reducers';
- export { default as operations } from './operations';
- export { default as types } from './types';
- export default reducers;" > index.js
- cd ../
- pwd
- printf "export { default as $1 } from './$1/index';\n" >> ./index.js
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement