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
13 Comments
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
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!
Jlevitt January 10th, 2009
What about adding “unpack” and “unminify”? :-)
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
Jonathan Christopher January 13th, 2009
Author
@Jlevitt: Great suggestions! I’ll add them to my to-do’s.
@Samuel Vogel: Unfortunately, I haven’t heard back from Panic quite yet, but I’ll continue seeing if there is anything else I can do!
James S April 18th, 2009
This looks great, but I’m having the same problems with large files. :/
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 [...]
Rob June 30th, 2009
This looks like a wonderful tool, however I’m receiving the following errors:
Minify:
Notice: Undefined variable: input in /Users/rob/Library/Application Support/Coda/Plug-ins/JavaScript Tools.codaplugin/Contents/Resources/DE90E0FB-2161-4269-A34B-E46B1BF60E02/minifyjs.php on line 13
Pack:
Notice: Undefined variable: input in /Users/rob/Library/Application Support/Coda/Plug-ins/JavaScript Tools.codaplugin/Contents/Resources/606ADC5D-BBD3-4BB3-A4F9-78593FF4FA29/packjs.php on line 13
Even though it shows the errors in the code, it looks like it is minifying/packing the code, but I have not saved and tested, for fear of the errors.
Any idea what could be the cause?
Thanks for giving us such a wonderful tool!
13 plugins essentiels pour Coda | iVicta July 2nd, 2009
[...] Javascript Tools Coda Plugin [...]
Ben July 26th, 2009
Rob – Those are not errors per se. It’s a notice that the developer has not declared or initialized the variables before using them – which is fine. It is a convention to declare your variables but it’s not a must in all scripting languages.
Those notices are not affecting the script.
Daan October 24th, 2009
Amazing plugin, makes it easy compressing js files within a few clicks.
Do you plan to continue this project and including YUI compressor & JSLint, or is this project “dead” ?
Mark McDonnell November 26th, 2009
I’m hoping this project isn’t dead and that you’ll look to implement YUI Compressor & JSLint as I use both of those religiously!
If you could email me to let me know either way.
Many thanks :)
Jonathan Christopher November 27th, 2009
Author
Hey everyone, no, this project is definitely not dead. It has been in part shelved due to some other work taking precedence but I’m going to do my best to issue a new release as soon as possible!