Another contribution
This week I had a chance to add new feature to a project of another programmer, Jun Song. Jun is friendly and also a professional coder.
After forking and cloning his project. I created a new branch with the same name as my issue I filed on his repo(issue-11). Then, I helped Jun to add another flag for his CLI tool. In more detail, his tool now can read a JSON file in which users can specify their options. Instead of entering a really long line:
jun-ssg -i "Silver Blaze.txt." --stylesheet "example.com"
Users now can store all of their options in a config.json
{
"input": "Silver Blaze.txt",
"stylesheet": "example.com"
}
And can just simply enter:
jun-ssg -c config.json
After that I merge issue-11
branch to master
. Then I sent him a request and still waiting for his feedbacks of correction.
Working and Testing via Remotes
Jun also worked on my project. Firstly, I used git remote add
and checked out to his branch to test. He did a really good job on validating users' input as well as supporting my tool to read a config JSON file. I saw no errors so I merged his request to my main branch.
In my opinion, git remote
is really useful. It allows you to test a pull request. First it can add the branch of the person who sends the request to our project. Then if you are satisfied, you can merge that branch to our main branch.
Issues
Jun's codes were well-organized with separated folders for main JS file and utility files. Also, to decorate the output to users, Jun used some packages to change tool's output. This was a really good user experience but for the first time, it made me a little bit confused when reading his codes. On top of that, I tried to run the command with -c
flag only but the tool kept telling me to specify input file, then I just realized that he made the -i
flag as required
. I fixed that and the tool worked well after.
In general, his type of coding was cool and professional, he split his codes into components, which were different functions. Also, keeping the main file and util
files into different folders will make you debug more easily. This worth learning.
Links to repos:
Issue: https://github.com/juuuuuuun/jun-ssg/issues/14
Pull request: https://github.com/juuuuuuun/jun-ssg/pull/15
My issue: https://github.com/nguyenhung15913/OSD600-SSG/issues/14
Jun's pull request: https://github.com/nguyenhung15913/OSD600-SSG/pull/18
Top comments (0)