Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(v2): cleanup console output #4979

Merged
merged 2 commits into from
Jun 16, 2021
Merged

refactor(v2): cleanup console output #4979

merged 2 commits into from
Jun 16, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Jun 16, 2021

Motivation

Attempting to tidy up any output in the console that Docusaurus codebase produces.

Main points:

  • Avoid using "programmatic" constructs like [] or =, and use a more user-friendly style of spelling instead (i.e. =[','] -> ",")
  • Using double quotes for values, fields, etc.
  • Adding a dot at the end of console message (except CLI options, no needed put dot in description of CLI options)
  • Making correct spelling of some words (eg. NodeJS -> Node.js)

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Snapshots?

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Jun 16, 2021
@lex111 lex111 requested a review from slorber as a code owner June 16, 2021 07:03
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 16, 2021
console.log();
console.log(chalk.cyan(' cd'), cdpath);
console.log(` ${chalk.cyan(`${pkgManager} start`)}`);

console.log();
console.log('Happy hacking!');
console.log('Happy building awesome websites!');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an attempt to distinguish from the CRA, I think it's fine to have an original slogan.

@netlify
Copy link

netlify bot commented Jun 16, 2021

✔️ [V2]

🔨 Explore the source changes: 37568d7

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60c9bcc1c2b7290007ee9b54

😎 Browse the preview: https://deploy-preview-4979--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Jun 16, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 52
🟢 Accessibility 97
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-4979--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Jun 16, 2021

Size Change: +5 B (0%)

Total Size: 624 kB

ℹ️ View Unchanged
Filename Size Change
website/build/assets/css/styles.********.css 87.6 kB 0 B
website/build/assets/js/main.********.js 445 kB +5 B (0%)
website/build/blog/2017/12/14/introducing-docusaurus/index.html 63.4 kB 0 B
website/build/docs/introduction/index.html 235 B 0 B
website/build/index.html 28.2 kB 0 B

compressed-size-action

@lex111
Copy link
Contributor Author

lex111 commented Jun 16, 2021

I don't really understand why the tests do not pass successfully, because snapshots do not differ 🤷‍♂️

image

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍 LGTM

@slorber
Copy link
Collaborator

slorber commented Jun 16, 2021

I don't really understand why the tests do not pass successfully, because snapshots do not differ 🤷‍♂️

Not sure what happened but Jest doesn't seem to like my test factorization much so I removed it and restored a bit of duplication, now the snapshots pass and can be updated

@slorber slorber merged commit 41d9288 into master Jun 16, 2021
@slorber slorber deleted the lex111/output-clean branch August 17, 2021 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants