Replace Make with Jake

Originally published at:

The root of all innovation is laziness. This is especially true for the IT field where we are driven by process automation. A process that is particularly annoying, so it needs to be automated, is deployment. Deployment also includes the critical step of building a software, i.e. compiling and modifying the sources to have as a result a running application. At the beginning, people used a set of scripts to perform the same building process. Once the same set of scripts had to be copied and used again, it was obvious that a common system had to be created.

The software Make has been proven to be a very good solution for the problem. It’s flexible and follows a clear concept, but this flexibility comes at a price. Many of the great software innovations we are building cannot work with Make. We don’t have any extension or package, and an extensible configuration isn’t possible. To avoid these issues, the patterns of generating Makefiles, using external scripts, or having multiple Makefiles are quite common.

We should not have to fall back to an ancient tool-chain, just to have a working build system. We should embrace modern technology and a software stack that we know very well. In this article, I’ll introduce you to Jake. It combines the concept and the advantages of Make with a Node.js environment. This means we can use any module we like and that scripting is not only possible, but encouraged.

Specialized Task Runners vs Generic Build Tools

The idea of using a JavaScript environment for creating a build tool isn’t new. Every front-end developer today knows Grunt or Gulp. And in many scenarios, these tools should still be the primary choice. So the question is: Where should I use what tool?

For web-related tasks, such as minifying JavaScript files, prefixing CSS, or optimizing images, task runners are to be preferred. But even in such cases, Jake could be considered as an option because it’s a superset of the mentioned tools. It’s much less specialized, and there is nothing against using it in that context.

With this in mind, Jake is a better fit either if you want to replace another build tool such as Make or if you have another build process that follows the classic dependency-rule approach, an approach where we have a rule that specifies one to many dependencies. The beauty of a generic build tool is that it can be used in many contexts.

Before we discuss the advantages of Jake in details, it’s worth taking a look at Make and its brilliant concept.

Continue reading this article on SitePoint

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.