Skip to content

Commit

Permalink
no log of generated example options unless enabled (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
brodybits committed Feb 26, 2020
1 parent 1dc8245 commit 666e6e0
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
4 changes: 3 additions & 1 deletion lib/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ const generateWithNormalizedOptions = ({
license: ${license}
view: ${view}
useAppleNetworking: ${useAppleNetworking}
` + (generateExample
? `
generateExample: ${generateExample}
exampleName: ${exampleName}
writeExamplePodfile: ${writeExamplePodfile}
`);
` : ``));

// QUICK LOCAL INJECTION overwite of existing execSync / commandSync call from
// mockable execa object for now (at least):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ Array [
license: MIT
view: false
useAppleNetworking: false
generateExample: false
exampleName: example
writeExamplePodfile: false
",
",
],
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ Array [
license: MIT
view: false
useAppleNetworking: false
generateExample: false
exampleName: example
writeExamplePodfile: false
",
",
],
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ Array [
license: MIT
view: false
useAppleNetworking: false
generateExample: false
exampleName: example
writeExamplePodfile: false
",
",
],
},
Object {
Expand All @@ -48,9 +45,9 @@ Array [
"error": Array [
"Error: ENOPERM not permitted
at Object.ensureDir (.../tests/with-mocks/cli/command/func/with-logging/with-error/cli-command-with-logging-with-error.test.js:9:27)
at ensureDir (.../lib/lib.js:153:15)
at generateLibraryModule (.../lib/lib.js:279:10)
at generateWithNormalizedOptions (.../lib/lib.js:296:10)
at ensureDir (.../lib/lib.js:155:15)
at generateLibraryModule (.../lib/lib.js:281:10)
at generateWithNormalizedOptions (.../lib/lib.js:298:10)
at createLibraryModule (.../lib/cli-command.js:...
at Object.func (.../tests/with-mocks/cli/command/func/with-logging/with-error/cli-command-with-logging-with-error.test.js:62:9)
",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ Array [
license: MIT
view: false
useAppleNetworking: false
generateExample: true
exampleName: example
writeExamplePodfile: false
",
",
],
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ Array [
license: MIT
view: false
useAppleNetworking: false
generateExample: true
exampleName: example
writeExamplePodfile: false
",
",
],
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ Array [
license: MIT
view: false
useAppleNetworking: false
generateExample: true
exampleName: example
writeExamplePodfile: false
",
",
],
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ Array [
license: ISC
view: false
useAppleNetworking: false
generateExample: true
exampleName: example
writeExamplePodfile: false
",
",
],
},
Object {
Expand Down

0 comments on commit 666e6e0

Please sign in to comment.