Skip to content

Commit

Permalink
show hint to generate example, if needed in CLI (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
brodycj authored Feb 26, 2020
1 parent c7ddef9 commit 1dc8245
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
16 changes: 11 additions & 5 deletions lib/cli-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ const normalizedOptions = require('./normalized-options');

const createLibraryModule = require('./lib');

const postCreateInstructions = ({ moduleName, exampleName }) => {
return `
const postCreateInstructions = ({
moduleName,
generateExample,
exampleName
}) => `
====================================================
YOU'RE ALL SET!
` + (generateExample
? `
To build and run iOS example project, do:
----
cd ${moduleName}/${exampleName}
yarn
react-native run-ios
----
`;
};
`
: `
${emoji.get('bulb')} next time consider using \`--generate-example\` to add a generated example!
`);

module.exports = {
name: 'create-library',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,7 @@ yarn-error.log
====================================================
YOU'RE ALL SET!
To build and run iOS example project, do:
----
cd react-native-alice-bobbi/undefined
yarn
react-native run-ios
----
💡 next time consider using \`--generate-example\` to add a generated example!
",
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,7 @@ yarn-error.log
====================================================
YOU'RE ALL SET!
To build and run iOS example project, do:
----
cd react-native-alice-bobbi/undefined
yarn
react-native run-ios
----
💡 next time consider using \`--generate-example\` to add a generated example!
",
],
},
Expand Down

0 comments on commit 1dc8245

Please sign in to comment.