[ANN] Javascript Squeezer 0.2

version 0.2 of Javascript Squeezer (javascript compression plugin, based on Mozilla Rhino javascript parser)

- added toolbar button (default off, can be activated within settings > javascript squeezer)
- added prefix setting: you can choose your own compressed file prefix, if left empty it will overwrite the file which is compressed.
- files are synchronised after compression
- fixed plugin name typo (squeezer instead of sqeezer). You'll probably need to unninstall old one and install new one, not sure how this goes.

Known issue(s):
if file is overwritten there's no undo possibility (I am looking for a way to create UNDO action, if anyone can help please do so ;), as I am novice to open API)



5 comments

Is this (or the Mozilla Rhino project) available as an ANT custom task?

As much as I value this, we have numerous JS files and I would like to
have an automatic build-time tool to do this.

Regards,
Amnon

0

How about being able to pick a separate compressed file directory; then over writing would not be an issue. You would edit the source, run Javascript Squeezer, and the compressed code would be put in the compressed directory.

If you allowed the designation of a source directory, then a user could do a one click/key combo to compress the entire source directory into the compressed directory.

You might allow the user to designate a backup directory and/or a backup prefix, which could also help with the issue of overwriting/undoing(though I am more in favor of source and compressed output directories.

Basically, I would want to keep my source and compressed files separete, and I would not have to worry about naming/renaming files.

Of course, this gets more complex if someone has multiple javascript directories in a project, but that could be solved by source to compressed directory mapping; this would allow for single click/key combo compression of all javascripts at once.

0

Hi Amnon,

Is this (or the Mozilla Rhino project) available as
an ANT custom task?

As much as I value this, we have numerous JS files
and I would like to
have an automatic build-time tool to do this.


as far as I know there is no ant task for this. I'll need it sooner or later, so I'll probably make one, but it's not planned yet..
I'll release plugin sources later this week after I finalize
it, so you could even write it yourself if there is a huge need.
-m

0

Hi,

How about being able to pick a separate compressed
file directory; then over writing would not be an
issue. You would edit the source, run Javascript
Squeezer, and the compressed code would be put in the
compressed directory.

If you allowed the designation of a source directory,
then a user could do a one click/key combo to
compress the entire source directory into the
compressed directory.

You might allow the user to designate a backup
directory and/or a backup prefix, which could also
help with the issue of overwriting/undoing(though I
am more in favor of source and compressed output
directories.

Basically, I would want to keep my source and
compressed files separete, and I would not have to
worry about naming/renaming files.

Of course, this gets more complex if someone has
multiple javascript directories in a project, but
that could be solved by source to compressed
directory mapping; this would allow for single
click/key combo compression of all javascripts at
once.


all valid points, I'll change plugin so it operates per project and implement per-directory compressing. Need to think best way to do it..
thanks for your pointers,
-m

0

version 0.3 released:

- added remove new line option (off by default, check Settings > Javascript Squeezer options).

Basically it makes one big line out of compressed script, it'll take care of neccessary separators (e.g. if you don't have closing semicolons statements).

-m

0

Please sign in to leave a comment.