DEV Community

Minsu Kim
Minsu Kim

Posted on

Adding New SSG Feature

In the week 5, the weekly assignment has been done with practicing a few new concepts of git command and implementing new feature of static site generator (SSG). In this week, I have a chance to work with Reza Poursafa's repo for adding feature to his code, and PR and Eugene Chung for reviewing his code from my repo. Previous lab I had a change to work with JavaScript to implement converting Markdown file to HTML file. This time, I have chosen to work with JavaScript again. I thought the process of add new feature supposes to be straight forward. However, even though the same program and same feature has written in same programming language, it is totally different because of the coding style and usage of library. The Reza’s code, he used ‘commander’ which is the library for implementing command-line interfaces. Therefore, I had to review the Commander.js documents for understanding concepts and syntax.

For the reviewing part, I have often used git pull to sync remote and my local repository in previous lab. In this lab, instead of using git pull, I use git remote to add remote repository where another student forked my repo to my local repository. Next, I have used ‘git fetch’ to download all the commits and branches in the remote repository to my local repository without merging. However I have an issue that I supposed to checkout the forked repository instead of git checkout -b “issue repo”. Therefore, I checked with ‘git log’ for checking commit number that my head is pointing the proper branch. Also, professor have me a tip which uses git checkout -B “target repo”. After reviewing, I have found an issue that the JSON configuration file includes output folder, but the HTML files create in default folder. I asked him to fix this problem. Everything works as expected.

Throughout this lab, I have learned different approaches to review and test via remote by using various git commands and work with other people’s project to understand other people’s code and learn different approach methods for implementing same features in same programming language.

Discussion (0)