boilersuit
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -30,7 +30,12 @@ const Cases = require('../../tools/cases'); | ||
let content = ''; | ||
const hasPayload = Object.values(set).includes('payload') || payloadOverride; | ||
const hasPayload = | ||
Object.values(set).filter( | ||
value => `${value}`.indexOf('payload') !== -1, | ||
).length > 0 || payloadOverride; | ||
content += concat([ | ||
``, | ||
describe ? `// ${describe}` : null, | ||
`export const ${actionCases.camel} = (${hasPayload ? 'payload' : ''}) => ({`, | ||
`export const ${actionCases.camel} = (${ | ||
hasPayload ? 'payload' : '' | ||
}) => ({`, | ||
` type: ${actionCases.constant},`, | ||
@@ -37,0 +42,0 @@ hasPayload ? ` payload,` : null, |
@@ -8,3 +8,3 @@ #!/usr/bin/env node | ||
program.version('0.1.11'); | ||
program.version('0.1.12'); | ||
@@ -11,0 +11,0 @@ program.command('up').action(() => { |
{ | ||
"name": "boilersuit", | ||
"description": "A CLI tool for generating selectors, reducers, actions, constants and sagas in react-boilerplate", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "author": "matt <matt.pocock@thevirtualforge.com>", |
@@ -46,7 +46,8 @@ <div style="text-align: center"><img src="https://raw.githubusercontent.com/mattpocock/boilersuit/master/logo.png" height="240px" alt="boilerplate logo"/></div> | ||
"hasError": false, | ||
"errorMessage": "" | ||
"errorMessage": "", | ||
"data": null | ||
}, | ||
"actions": { | ||
"submitTodoStarted": { | ||
"describe": "Begins the Submit Todo API Call. Passes the todo as the payload.", | ||
"describe": "Begins the Submit Todo API Call. Passes the todo as the payload to the saga.", | ||
"saga": true, | ||
@@ -59,10 +60,12 @@ "passAsProp": true, | ||
"hasError": false, | ||
"errorMessage": "" | ||
"errorMessage": "", | ||
"data": null | ||
} | ||
}, | ||
"submitTodoSucceeded": { | ||
"describe": "Called when the Submit Todo API call completes.", | ||
"describe": "Called when the Submit Todo API call completes, passing info to data as a payload.", | ||
"set": { | ||
"isLoading": false, | ||
"hasSucceeded": true | ||
"hasSucceeded": true, | ||
"data": "payload" | ||
} | ||
@@ -69,0 +72,0 @@ }, |
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
178726
3405
217