December 15th, 2008

JavaScript Tools Coda Plugin

One bundle I found myself using consistently within TextMate is JavaScript Tools. The bundle gives you a number of great tools right at your fingertips for working with JavaScript. I decided to begin porting what I can to a Coda plugin.

JavaScript Tools Coda Plugin

One of the most useful parts of the JavaScript Tools bundle was the ability to Minify or Pack your source within TextMate. Having the ability to compress and obfuscate your JavaScript is of great benefit, and I did my part when I could. Minification and Packing are two different technologies, both with pros and cons. I decided to integrate both as they are my tools of choice.

I ran into some issues when putting this plugin together, however. While testing, I was using one of the many jQuery plugins and compression was going great. As I continued my testing, I attempted to Minify jQuery. That’s when things started getting a bit sticky. When invoking the compression of a larger JavaScript file, Coda began to act a bit strange. The application itself would seem to choke and eventually freeze. After a few seconds of locking up, my entire machine would freeze, forcing a hard reboot. I’m currently in contact with Panic to see if there is an issue with my personal machine, or something else entirely.

When working properly, the plugin operates like this:

I hope to work with Panic over the next few days to come up with a solution to the ‘large file problem’ and I’ll post a revision as soon as some new information surfaces. In the meantime, if you’d like to crack open the plugin and see if you spot any red flags, I’d be greatly appreciative. Currently the plugin misbehaves whether you Minify or Pack, so I’m lead to believe it’s an issue outside one class or the other.

Future plans include the incorporation of the YUI Compressor as well as JSLint. After solving the issue of working with larger files, I’m going to work on integrating those technologies.

Download JavaScript Tools

Version 0.5
December 15, 2008 - Initial release

 Comments

7 Comments

  1. tee December 18th, 2008

    First cool that you convert the tm bundles to coda plugins ! very cool. But I have the same issue like with the comment banner. I am using a mamp version for php, that means I have symlinked my mamp php to the standart Os X installation, which is used by coda (I think so). I need that to do command line execution for several frameworks like symfony. The issue is the error level. Maybe you can use the inbuild error handler of php to catch these notices or surpress all output which is not allowed. I havn’t done this with coda but I will try to solve thise use on the weekend. Its quite interessting. (output buffering is maybe a keyword)

    BR Thomas

  2. Ray Brown December 25th, 2008

    Woo! I just found your CSS Tools plugin, which led me to this. Bugs aside, I’m sure this will be a great tool to have. Keep up the amazing work!

  3. Jlevitt January 10th, 2009

    What about adding “unpack” and “unminify”? :-)

  4. Samuel Vogel January 10th, 2009

    Hey,

    I just locked up my system the same way you did.
    Hope you can fix the problem!

    Regards,
    Samy

  5. James S April 18th, 2009

    This looks great, but I’m having the same problems with large files. :/

  6. Must have: Coda l’éditeur tout en un pour Mac | Leaf creation April 24th, 2009

    [...] ). Certains proposent également de “minifier” ou de “packer” vos sources Javascript ou CSS. Bref les possibilités sont [...]

 Leave your mark

Leave a comment