Day 51. Finished Restaurant project

·

2 min read

Today is Monday morning and I have a day of studying ahead of me (and hoping to get a bit done on the Todo List project). I did finish the Restaurant project yesterday. It involved using Webpack, which I was struggling to understand. I went quickly through the readings (I admit, I very often get distracted when reading), did the tutorial on setting stuff up, but still wasn't sure what it does exactly and what is src and dist. When I started setting up the project, I followed the steps of the tutorial, but then started adding stuff directly into the dist folder. I wasn't sure what happens when I did "npx webpack" and was just confused. I did not give up though, figured I'll try to find a YouTube tutorial, and found a 2-hr video by Colt Steele. I watched about half of it, cloned the Github repository, looked through the commits on Github following the video... and I think I mostly got it! I somehow added the CSS loader, file loader, and made my image and styles appear! (I hope I did it right? I should go back to that video and work though it again and finish the second half!). Struggled a little bit with the tab logic, but overall, everything works. Although I think I should have maybe cleaned up my code a bit! (but I guess I'll learn more in the next module) I did start to write out sections of the menu as functions, and it was pretty... I guess the word for it is spaghetti-code-ish? I ended up putting the menu in an object, and printing it out with a function. I should've spent more time cleaning things up in the Contacts section, but also I put an