-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
So this week for our lab we did more practice with working with another person's repo. This week I decided to mix it up a bit and work on a SSG in JavaScript, so I made a pull request for Ritik's repository. Our task was to add a new feature that would allow the user to input a JSON config file as an argument, that config file would contain a JSON object with all the arguments the user wanted to use for the HTML output. Such as input file, output location, stylesheet, language, etc.
It was pretty easy to get back into JavaScript, although I never made many command line programs using JavaScript. I mainly only had used JavaScript for web development projects. So it was cool to see how Ritik did this using the Commander package. The feature was pretty simple to add because of Commander. It made it easy to add a new command line flag to accept -c or --config and then all I had to do was check if this flag existed. If it did then it would update the options to match the ones given in the config.json file, while setting defaults if no setting was given. Otherwise, it would run like normal using given command line arguments. You can find the branch I made here and the PR here.
It was pretty easy to get back into JavaScript, although I never made many command line programs using JavaScript. I mainly only had used JavaScript for web development projects. So it was cool to see how Ritik did this using the Commander package. The feature was pretty simple to add because of Commander. It made it easy to add a new command line flag to accept -c or --config and then all I had to do was check if this flag existed. If it did then it would update the options to match the ones given in the config.json file, while setting defaults if no setting was given. Otherwise, it would run like normal using given command line arguments. You can find the branch I made here and the PR here.