This is an old revision of the document!
Table of Contents
Toward a Web Development Environment
You might want to jump directly to Fleshing out Komodo Edit.
Candidates for core editing
Komodo Edit
Komodo Edit is a FOSS “freemium” subset of Komodo IDE. Longish startup time. Reasonable tooltips and autocompletion. (You can add APIs and links to dirs that should be scanned.) Flexible linting. No code reformatting. You can add external tools to interface.
Netbeans
Netbeans has lots of support for HTML5 built in. Good tooltips and autocompletion. Long startup time. Inflexible linting, testing, etc. Can't add “external tools” to interface (plugins for this either don't work or work poorly on Linux). And oh-so-painful Swing font rendering on Linux. If it weren't for the font rendering, in spite of the other limitations this would still be a very attractive option.
Aptana
Aptana is based on the Eclipse IDE. Buggy. Long startup time. Probably has awesome tooltips and autocompletion, but I didn't get that far.
JetBrains
Didn't try because of the oh-so-painful Swing font rendering on Linux.
Geany, Gedit, etc.
Too hard to add tooltips, etc.
Desired Features
Unit test runner
Should be automatic.
- JS Testrunner
- Testem
Linting
Ideally automatic.
JavaScript
- JSHint
- JSLint
CSS
- ?
HTML
- tidy?
Code formatting
- js-beautify does JS, CSS, and HTML
CSS compiler
We want to be able to compile LESS, SASS, or whatever, and it should probably be automatic.
- ?
Minification
Applied at deploy time?
- ?
Fleshing out Komodo Edit
The following describes what I have done to help make Komodo Edit a more complete Web development platform. The following addresses only the needs of front-end development.
It will use:
- JSHint for JavaScript syntax checking. (This is built into Komodo Edit).
- Testem+Mocha+Chai for automated unit testing.
- jsbeautify for JS, CSS, and
I've yet to get to:
- CSS and HTML syntax checking
- Compiling CSS
- Minification
Note that Komodo Edit configurations don't appear to carry over when you install a new point release. So you will have to repeat a lot of this when doing version upgrades. Decent support for JSHint and JSLint are built in, so we won't have to add those.
Install the editor
Download and install Komodo Edit from http://www.activestate.com/komodo-edit.
Extensions and plugins
Confirm that you have the following extensions and install as needed:
- NST
- TODO Helper
- Emmet [todo]
- Side By Side Diff [todo]
I also disabled a whole bunch of extensions that didn't seem relevant to my needs.
Go through the list of plugins and disable anything that was automatically picked up from Firefox but isn't relevant to Komodo Edit.
Add a file manager handler
The expected file manager in Linux is hard coded as nautilus
or konqueror
. A workaround for this if you have neither of these is to add a script to your local bin named nautilus
or konqueror
that handles
os.system('nautilus "%s" &' % filename)
or
os.system('konqueror --profile filemanagement "%s" &' % filename)
respectively.
A simpler workaround is to add a soft link in your local bin named nautilus
to /usr/bin/thunar
or your prefered file manager.
Install Node.JS
Both Testem and js-beautify rely on Node.js and the Node.js package manager (i.e., npm
). Follow your OS's/distribution's directions for installing these. On my Debian sid-based system, it meant installing three packages:
# apt-get install nodejs nodejs-legacy npm
Install Testem
Install jsbeautify
Install jsbeautify for Node.JS with:
# npm -g install js-beautify
I also added a config file in my home directory for my default js-beautify settings.
- .jsbeautifyrc
{ "indent_size": 4, "indent_char": " ", "indent_level": 0, "indent_with_tabs": false, "preserve_newlines": true, "max_preserve_newlines": 10, "jslint_happy": true, "brace_style": "collapse", "keep_array_indentation": false, "keep_function_indentation": false, "space_before_conditional": true, "break_chained_methods": false, "eval_code": false, "unescape_strings": false, "wrap_line_length": 72 }
Add webbeautify script
I added a this script on my PATH that accepts a file, senses whether it is HTML, CSS, JS, or none-of-the-above, and then does an appropriate inplace beautify on it possible.
Add external tools to Komodo Edit
Terminal
Terminal (project direcory)
Testem
Beautify