jerluc
jerluc

Reputation: 4316

standalone javascript minifier (such as single-package zero-dependency version of packer)

I'm trying to find a single-packaged javascript minifier written in javascript for use outside of the browser. I've normally gone with Dean Edward's /packer/, however, after further inspection of the source code, there are way too many dependencies involved such as his custom base2 library for eliminating common browser incompatibilities (of course this entire library won't work for running the script outside of a browser!) and Base (his custom library for basic javascript class inheritance).

My only other option would be for me to digest the pure PHP port of /packer/ and essentially re-translate the code back into javascript (of course the PHP version doesn't have these dependencies, so this might be what I want).

Of course, I would like to know if there are any other solutions before I embark on my translation of the entire 17K file.

Upvotes: 3

Views: 2333

Answers (1)

KooiInc
KooiInc

Reputation: 122966

Would googles closure compiler be a candidate? There are several ways to use it, see documentation

Douglas Crockford also wrote a jsmin, it's a stand alone executable, written in c.

On this page I found a js-only minifier (the script is here)

Upvotes: 1

Related Questions