Skip to content

Commit

Permalink
fix: Correcting create command finished instructions (#1503)
Browse files Browse the repository at this point in the history
**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]>
  • Loading branch information
rschristian and rschristian committed Mar 8, 2021
1 parent 2f5e512 commit a72a674
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-pugs-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'preact-cli': patch
---

Ensures the create command returns startup instructions to users
12 changes: 6 additions & 6 deletions packages/cli/lib/commands/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,20 +409,20 @@ async function command(repo, dest, argv) {

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

return (
process.stdout.write(
trim(`
To get started, cd into the new directory:
${green('cd ' + dest)}
${green('cd ' + dest)}
To start a development live-reload server:
${green(pfx + ' dev')}
${green(pfx + ' dev')}
To create a production build (in ./build):
${green(pfx + ' build')}
${green(pfx + ' build')}
To start a production HTTP/2 server:
${green(pfx + ' serve')}
`) + '\n'
${green(pfx + ' serve')}
`) + '\n\n'
);
}

Expand Down

0 comments on commit a72a674

Please sign in to comment.