boilersuit
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -19,3 +19,2 @@ const { transforms, concat } = require('../../../tools/utils'); | ||
const index = b.indexOf(`const ${name}CustomFunction`); | ||
console.log(index); | ||
if (index !== -1) return b; | ||
@@ -22,0 +21,0 @@ return concat([ |
@@ -15,10 +15,12 @@ const { | ||
ensureImport(`${cases.camel}Reducer`, '../reducer', { destructure: true }), | ||
...Object.keys(actions).map(actionName => buf => { | ||
const actionCases = new Cases(parseCamelCaseToArray(actionName)).all(); | ||
return transforms(buf, [ | ||
ensureImport(actionCases.camel, '../actions', { | ||
destructure: true, | ||
}), | ||
]); | ||
}), | ||
...Object.keys(actions) | ||
.filter(action => !actions[action].customFunction) | ||
.map(actionName => buf => { | ||
const actionCases = new Cases(parseCamelCaseToArray(actionName)).all(); | ||
return transforms(buf, [ | ||
ensureImport(actionCases.camel, '../actions', { | ||
destructure: true, | ||
}), | ||
]); | ||
}), | ||
b => | ||
@@ -25,0 +27,0 @@ concat([ |
@@ -23,3 +23,2 @@ const { | ||
ensureImport('takeLatest', 'redux-saga/effects', { destructure: true }), | ||
ensureImport('call', 'redux-saga/effects', { destructure: true }), | ||
ensureImport('put', 'redux-saga/effects', { destructure: true }), | ||
@@ -93,2 +92,10 @@ b => { | ||
}, | ||
b => { | ||
if (b.indexOf('call(') !== -1) { | ||
return ensureImport('call', 'redux-saga/effects', { | ||
destructure: true, | ||
})(b); | ||
} | ||
return b; | ||
}, | ||
ensureImport(actionCases.constant, './constants', { destructure: true }), | ||
@@ -95,0 +102,0 @@ prettify, |
@@ -12,3 +12,2 @@ const { | ||
ensureImport('takeLatest', 'redux-saga/effects', { destructure: true }), | ||
ensureImport('call', 'redux-saga/effects', { destructure: true }), | ||
ensureImport('put', 'redux-saga/effects', { destructure: true }), | ||
@@ -73,2 +72,11 @@ b => { | ||
ensureImport(actionCases.constant, './constants', { destructure: true }), | ||
b => { | ||
console.log(b.indexOf('call(')); | ||
if (b.indexOf('call(') !== -1) { | ||
return ensureImport('call', 'redux-saga/effects', { | ||
destructure: true, | ||
})(b); | ||
} | ||
return b; | ||
}, | ||
prettify, | ||
@@ -75,0 +83,0 @@ ]); |
{ | ||
"name": "boilersuit", | ||
"description": "A CLI tool for generating selectors, reducers, actions, constants and sagas in react-boilerplate", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "author": "Matt Pocock <matt.pocock@thevirtualforge.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
463090
3441