One minute
Swank JS
Have you ever wanted to modify your browser’s content directly from a text editor?
Episode 11 of Emacs Rocks shows how swank-js can seriously speed up your web development workflow. If you haven’t added Emacs Rocks to your RSS reader yet, I highly recommend it - it’s a great source of tips and tricks for daily Emacs use.
So what is swank-js? As its GitHub description says, it provides a JavaScript REPL (read-eval-print loop) connected to your browser via Socket.IO. In practice, this means any JavaScript expression you type in the REPL immediately affects the page you’re connected to. Better yet, you don’t even need the shell - you can send code and CSS to the browser directly from your working buffer.
Sounds familiar? If not, check out Bret Victor’s Inventing on Principle - one of those tech talks that sticks with you long after you’ve watched it.
swank-js filled a gap in my web development toolbox that I had previously tried to fill with moz-repl. Unfortunately, moz-repl only works with Mozilla-based browsers - no Chrome, no Safari.
Now I’m extremely happy with Chrome on one screen, Emacs on the other, and instant visual feedback just one C-c C-c away.