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

Webpack: Make bash formatting in install statements consistent #28948

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

softy-dev
Copy link
Contributor

Because

In the whole article, all commands detailing the installing of a package are written with a bash formatting, except for the edited one. When skimming through the page, one can end up skipping the command instruction this way.

This PR

  • Changes how a specific sentence of the page is formatted for better clarity and consistency.

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: JavaScript Involves the JavaScript course label Oct 12, 2024
Comment on lines 262 to 268
We need to install and tell Webpack to use something called `html-loader`, which will detect image file paths in our HTML template and load the right image files for us. Without this, `./odin.png` would just be a bit of text that will no longer reference the correct file once we run Webpack to build into `dist`. Let's install it:

```bash
npm install --save-dev html-loader
```

then add the following object to the `modules.rules` array within `webpack.config.js`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
We need to install and tell Webpack to use something called `html-loader`, which will detect image file paths in our HTML template and load the right image files for us. Without this, `./odin.png` would just be a bit of text that will no longer reference the correct file once we run Webpack to build into `dist`. Let's install it:
```bash
npm install --save-dev html-loader
```
then add the following object to the `modules.rules` array within `webpack.config.js`:
We need to install and tell Webpack to use something called `html-loader`, which will detect image file paths in our HTML template and load the right image files for us. Without this, `./odin.png` would just be a bit of text that will no longer reference the correct file once we run Webpack to build into `dist`. Let's install it:
```bash
npm install --save-dev html-loader
```
Then, add the following object to the `modules.rules` array within `webpack.config.js`:

A fair improvement made. Just a nit that needs changing as above to make sure things are aligned properly and the list numbering doesn't get broken up (as per the screenshot below):

image

@MaoShizhong
Copy link
Contributor

There are a lot of extra unwanted changes that look like it came from a formatter on your local device. Could these changes be reverted please? We only need the changes requested up above.

@softy-dev
Copy link
Contributor Author

There you go! Are the changes satisfactory?

@MaoShizhong
Copy link
Contributor

Just need to remove the spaces from those "blank" lines so that they're actually blank lines, then we should be good to go!

@softy-dev
Copy link
Contributor Author

Woops, my bad!

Copy link
Contributor

@MaoShizhong MaoShizhong left a comment

Choose a reason for hiding this comment

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

🚀

@MaoShizhong MaoShizhong merged commit 6146a3a into TheOdinProject:main Oct 12, 2024
2 checks passed
@softy-dev softy-dev deleted the patch-1 branch October 12, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: JavaScript Involves the JavaScript course
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants