Sublime Forum

Uglifyjs plugin?

#1

Hi, all

why there ist’n uglifyjs plugin for sublime?

I think this is the best way to beauty and compress javascript.

hope some one develop that include both beauty and compress.

thanks

0 Likes

#2

No one has gotten around to it. tanpiper is working on a Node.js plugin to run node commands, so you could leverage that to run the node.js scripts when the rest of his issues get figured out.

uglifyjs would be very easy to incorporate into a plugin. Wbond just wrote a great writeup on how to write a plugin. So you could try your hand at it.

If I get some time, I might look into writing it for you. Really all you need is some knobs to tweak uglify’s settings, and a simple command to execute the script. uglify.js doesn’t really need any post-processing, maybe just throw the output in an output panel, or show a error message if it fails. Ideally, someone could just make one plugin to run uglify, yuicompressor, closure-compilor, or packer (though I am not sure if anyone actually uses packer). That way you would have all of your options in one place.

0 Likes

#3

Just implemented it within my nodejs package, it’s a small custom script that can be run on the current file, or accept a list of arguments for input files, and will output to a new tab.

I’ll release it later today or tomorrow as part of a larger release

0 Likes

#4

[quote=“tanepiper”]Just implemented it within my nodejs package, it’s a small custom script that can be run on the current file, or accept a list of arguments for input files, and will output to a new tab.

I’ll release it later today or tomorrow as part of a larger release[/quote]

Nice. I was hoping you would come through on this :smile:.

0 Likes