Creating A Command Line Utility With Node.js

One of the great things about being a programmer and learning to program is that it is great at helping us be lazy. When I say lazy I don't mean in the literal sense where you sit around and do nothing all day, but in the sense that it helps you find ways to do things in a more automated way because you are too lazy to keep repeating the same things over and over.

In my night job as a Unity game developer/hacker, I grew tired of doing the same things over and over when starting a new project. Create a new project, import this asset, import that asset, pull a script library from GIT, pull in some stock graphics from here, etc, etc.

So I built a little utility program called uModules which lets you essentially create a bill of materials that you can use to kick-start a project, and then keep all your external libraries and assets up to date. This really useful for building on multiple platforms, and useful for teams who want to make sure everyone is using the same assets in their projects.

This post is not really about that utility, but it is about rewriting the utility in Node. Originally I wrote the utility in Python, and it has served me well, but I have found it too difficult to maintain and add on to. One, because I still suck at Python and two because I still suck at Python.

What I am good at, well at least better at, is JavaScript. I use JavaScript everywhere. At home, at work, so i at least feel like I am better at it. Recently I have discovered Node, not just as a Web development platform, but as a facility to build desktop applications and command line utilities. In addition, it is cross platform, and drop dead easy to package and make available for people to use.

Over the course of the next few weeks, I will be posting some more entries discussing the migration of uModules to Node. Along  the way I hope that you learn some more about how uModules can help you in your Unity development, and how we can solve simple problems through automation.

Comments

Comments powered by Disqus