DEV Community

Neil An
Neil An

Posted on

Refactoring my SSG repo

Hi everyone,

This week, I refactored my SSG repo to clean up my repo. Here is the commit.

I fixed a few things in my repo. First, I extracted a function that dealt with reading a file line by line. There were two places were this code was repeating, so I created a new function to handle this logic. Another thing I cleaned up was the file names. For example, I changed the file name from generateHTML.js to generate-html.js. Finally, I created separate folders for all my files containing logic and test files. All the logic files were placed into a src folder and all the test files were places into a test folder.

The interactive rebase went well and there were no bugs that I found when doing it. Luckily my program didn't break when I did my changes, so everything went smoothly.

Top comments (0)