How to setup JavaScript Build in Sublime Text 2

Yes I am turning friend of Sublime Text and thought to use Sublime for JavaScript development as well. To execute JavaScript in Sublime, you need to create new Build System for JavaScript. There are two steps you need to follow,

  1. Install Node.js
  2. Create new build system for JavaScript

To install Node navigate to and click on download.


You will be navigated to download page. From here select required installer, download that and then install that. I am working on Windows machine so I selected option of Windows Installer.

After successful installation go to shell and verify successful installation. To verify it type npm on command prompt and you should get output as given below. It also verify that node is successfully added to the path.


Once Node is installed you need to create Build System for JavaScript. To do that navigate to

Tools -> Build Systems->New Build System

Here you need to write below code.


After this you can save file with any desired name. I am giving name as JavaScript-Sublime. Once you saved the file go to Tools-> Build System and you should able to see JavaScript-Sublime Build.


You need to select this build. After this go and write a simple JavaScript


And when you press Ctrl+B , you should able to get desired output as follows ,


So happy writing JavaScript in SublimeText. I hope you find this post useful. Thanks for reading.

3 responses to “How to setup JavaScript Build in Sublime Text 2”

  1. […] How to setup JavaScript Build in Sublime Text 2 (Dhananjay Kumar) […]

  2. I like to read your posts

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at