I’ve been doing a lot of HTML/JS development lately. My editor of choice these days is Sublime Text 2. A really great editor with loads of features and nearly infinite customization ability. But, as I’m doing a lot of learning and experimenting, I’m finding the need to create a lot of small, throwaway projects to try something out. In sublime, doing such a thing means:
Compare this to the good old days with Flash:
So I decided to make a project template that does most of the work in setting up a project. And I think I have a pretty decent setup at this point, so I will share it.
The template comes in two pieces: a zip file and a build.xml file for ANT. Yeah, you’ll need ANT installed and functioning on your system for this to work. The build system depends on it anyway. So if you’re anti-ANT, you can stop reading here.
Download the file here. Unzip it and you’ll have the zip and xml files. Save these somewhere safe.
Now, when you want to make a new project, Here’s what you do:
Now you can open Sublime Text 2, and from the menu, navigate and open your new project. It should look like this:
Here we have some various useful directories for putting stuff into, including a scripts dir with a main.js file in it that looks like this:
[php lang=“JavaScript]window.onload = function() {
document.writeln(“hello world”);
}[/php]
All ready for you to insert your real code.
An index.html file that looks like this:
[php lang=“html”]