Skip to content

Commit c0a1755

Browse files
committed
fix: Correcting create command finished instructions (#1503)
**What kind of change does this PR introduce?** Bugfix **Did you add tests for your changes?** No **Summary** The CLI's `create` command is supposed to output some instructions to users upon completing. However, this is broken on the latest version, and looks to have been broken years ago. Was just hidden while everyone was still using `2.2.1` for their global installs. **Does this PR introduce a breaking change?** No Co-authored-by: Ryan Christian <[email protected]>
1 parent 9f6cdc6 commit c0a1755

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.changeset/curvy-pugs-fail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'preact-cli': patch
3+
---
4+
5+
Ensures the create command returns startup instructions to users

packages/cli/lib/commands/create.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,20 +409,20 @@ async function command(repo, dest, argv) {
409409

410410
let pfx = isYarn ? 'yarn' : 'npm run';
411411

412-
return (
412+
process.stdout.write(
413413
trim(`
414414
To get started, cd into the new directory:
415-
${green('cd ' + dest)}
415+
${green('cd ' + dest)}
416416
417417
To start a development live-reload server:
418-
${green(pfx + ' dev')}
418+
${green(pfx + ' dev')}
419419
420420
To create a production build (in ./build):
421-
${green(pfx + ' build')}
421+
${green(pfx + ' build')}
422422
423423
To start a production HTTP/2 server:
424-
${green(pfx + ' serve')}
425-
`) + '\n'
424+
${green(pfx + ' serve')}
425+
`) + '\n\n'
426426
);
427427
}
428428

0 commit comments

Comments
 (0)