Read my book

I wrote books about Webpack and React. Check them out!

Tuesday, June 25, 2013

Mankees - a Scripting Platform for Node.js

Isn't it annoying to do certain boilerplate tasks such as bumping version number? As programmers it's our duty to eliminate boring tasks as that allows us to focus on the more interesting ones. Traditionally these sort of things have been sorted out by writing scripts (bash, etc.).

Unfortunately I'm not that great at bash scripting and I cannot even begin to comprehend how to do something simple like modifying package.json using it. It's way easier for me to do these sort of manipulations using Node.js as there's native support.

libtemplate.js - Library Template

I solved that version number problem earlier at libtemplate.js, a template library of sorts. It's a library on top of which you can write a library of your own. How meta.

It didn't feel right to include the script in the project. On the other hand I didn't want to pollute my bash namespace with it by putting a yet another script to my path. And besides, I've always wanted to write a little package manager of my own.

mankees - mankee see, mankee do

Crow and crow by antiuser
(CC BY-NC-SA)
I went ahead and wrote one. It's known as mankees. Mankee see, mankee do you know. Each mankee (plugin) performs some specific task. There's a small wiki based registry. The tool simply acts as a wrapper that makes it easy to install and execute these tasks. That's all.

If you ever wanted to write a package manager, say for frontend JavaScript, having a look at the implementation might give you some idea. On a more serious note please avoid doing that. We have enough of those already.

Conclusion

There aren't too many plugins available yet. Just a template and a tagging one. As I come by repetitive tasks I intend to turn them into mankees. If you happen to have specific ideas, let me know. Perhaps we can shape the tool into something more than a curiosity.