Yesterday I spent some quality time on documentation.js and other projects. Here’s the gist:
- I switched documentation.js and gulp-documentation to use prettier for code formatting. Prettier is the way forward with code formatting: instead of checking for style nitpicks, it automatically formats code exactly how it should be, and can even do it on editor save. Unfortunately this took longer than expected because of certain formatting bugs, but I strongly feel like it’s worth enduring the bleeding edge: gofmt, elm-format, and other tools have shown that formatters are better than style linters.
- I manually audited dependencies, identified one unused and two replaceable dependencies, and removed them. Categorizing dependencies also gave me a good idea of which parts of documentation.js are requiring the most extra code, providing more motivation to switch off of module-deps, which requires a lot of dependencies.
- I merged James Kyle’s interface support PR, which makes our Flow support more comprehensive.
- I switched from standard-changelog to standard-version, a much more aggressive system that not only creates changelogs but also local git tags and bumps the version in
package.json. I used to release 4.0.0-beta.19 and it worked great.
- I enabled GreenKeeper across documentation.js repositories and all of my repositories in the
simple-statistics organizations, to make sure that dependencies stay as fresh as possible.
- I designed a new documentation.js logo and refreshed the readme, as well as improved the awesome-documentation readme. Branding matters.
I also had simple-statistics performance on the mind, so I expanded its benchmark suite to compare current-master performance and implemented the simplest of the low-hanging fruit optimizations - swapping
Math.pow(n, 2) for
n * n.
Today I’m going to try to fully organize the issue queue and start chipping away at some of the themes. I’m happy that I spent most of my energy Monday on systematic changes that will make my projects easier to maintain. There’s more systemization that might happen: specifically using Lerna to create a monorepo for documentation.js and its components. But that will wait for a bit.