Monday, September 24, 2012

Using Sublime Text 2 Build Systems, NodeJS and Mocha

Recently, I've been switching between TextMate and Sublime Text 2. The latest feature I've been using quite a bit on NodeJS projects is the Sublime Text 2 Build Systems. Although I don't specifically use the "NodeJS Build System", I do use the Make version with a minor edit to how it pipes its commands through shell instead of its own sandboxed way of doing things. This enables the build system to leverage your current bash settings.

Below is a screenshot of my Sublime Text set to Make build system:


Below is a screen shot of what was changed (~/Library/Application Support/Sublime Text 2/Packages):


A Sublime Text 2 build system is a preconfigured plugin for Sublime Text with associated keybinds to make running tests, compiling the project, and deploying your application easier. It's a productivity monster. People who come from the Visual Studio or Eclipse (Java) world will love it as running your GNU make build system can be as easy as +B (if you're on OS X).

This is the result:


Hope that helps!

If you're wondering what my Makefile has, it's a simple one that invokes Mocha and points to the tests directory, as well as, changes the reporter to be less chatty.

Post a Comment