diff --git a/lib/cli-command.js b/lib/cli-command.js index 105402b7..1a3d88dc 100644 --- a/lib/cli-command.js +++ b/lib/cli-command.js @@ -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', diff --git a/tests/with-mocks/cli/command/func/with-logging/with-bogus-platforms/bogus-name/__snapshots__/cli-command-with-bogus-platforms-name.test.js.snap b/tests/with-mocks/cli/command/func/with-logging/with-bogus-platforms/bogus-name/__snapshots__/cli-command-with-bogus-platforms-name.test.js.snap index 4bf85191..324f0ffc 100644 --- a/tests/with-mocks/cli/command/func/with-logging/with-bogus-platforms/bogus-name/__snapshots__/cli-command-with-bogus-platforms-name.test.js.snap +++ b/tests/with-mocks/cli/command/func/with-logging/with-bogus-platforms/bogus-name/__snapshots__/cli-command-with-bogus-platforms-name.test.js.snap @@ -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! ", ], }, diff --git a/tests/with-mocks/cli/command/func/with-logging/with-bogus-platforms/empty-string/__snapshots__/cli-command-with-empty-platforms-string.test.js.snap b/tests/with-mocks/cli/command/func/with-logging/with-bogus-platforms/empty-string/__snapshots__/cli-command-with-empty-platforms-string.test.js.snap index 6c1be68d..d69568df 100644 --- a/tests/with-mocks/cli/command/func/with-logging/with-bogus-platforms/empty-string/__snapshots__/cli-command-with-empty-platforms-string.test.js.snap +++ b/tests/with-mocks/cli/command/func/with-logging/with-bogus-platforms/empty-string/__snapshots__/cli-command-with-empty-platforms-string.test.js.snap @@ -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! ", ], },