These recent weeks in Open Source have been an interesting and fun one for me. I’ve learned more about proper project documentation, rebasing, task automation, various Node.js core modules, and making larger Pull Requests to projects. Most of those lessons were related to a couple of contributions in particular, which you can view here:
chore: update automation process for docusaurus documentation generation by jkmdev · Pull Request…
Description This PR adds a script that automates the copying of documentation files into docs/en/packages, a folder…
chore: add script for typedoc docusaurus integration by jkmdev · Pull Request #1481 ·…
Description Implements #1382 Creates a script that copies package readme.md files into docs/en/packages. Then uses…
Working with Docusaurus
These recent weeks were my first exposure to Docusaurus. Learning about something like this was great because I’m now likely to use it as a solution in the future. It’s a nice, quick way to create a simple documentation site.
It’s pretty interesting to learn how it works in general. The highest level description of it I can give is that it will take files you store in a certain folder + a couple json files and use these to generate your site for you. I wouldn’t mind learning more about how Docusaurus actually goes about doing that, at some point.
I’ve been wanting to get better with Node and my recent Open Source contributions have certainly centered around that a lot! I’ve been writing a lot of different Node-centric blog posts lately, each inspired by said work.
One thing that I’m a bit caught on is how to better handle spawned processes in Node applications. In the recent script I wrote 30 typedoc processes would be spawned simultaneously….
const typedoc = spawn(typedocPath,
'--out', output, file,
…and this would cause the CPU use to reach 100% of its utilization, making the computer itself very laggy and slow! Not only that but the processing itself would take a while. So effectively a developer’s computer could become close to unusable for a minute or two, purely because this script was running….
I have a hunch there was something I could do to at least alleviate the CPU usage on the computer when something like this is running. I’m definitely going to look into this one more in-depth.
At this point I’m making smaller fixes or changes to what I wrote. For example, there would be nits in one script I’d notice while writing the other, and instead of addressing them in a technically unrelated PR I saved them for later.
refactor: update how copy readme script prints output to terminal by jkmdev · Pull Request #1546 ·…
Description Makes small improvements to the build/documentation/copy-package-readme.js file including: uses the chalk…
For a while I think I’ll just focus on making smaller, easier bug fixes to this project. I want to learn more about the 30 or so packages/projects included in it, doing so would be a better way of learning about each different one.