Which Javascript minifier (cruncher) does the same things that the one Google uses for its JS APIs?

后端 未结 6 1922
予麋鹿
予麋鹿 2020-12-12 18:18

I am a Google Maps API (javascript) developer. I have noticed that Google uses a Javascript minifier that has the following features:

  1. Shortens variables, prope
相关标签:
6条回答
  • 2020-12-12 18:47

    A simple online javascript minifier based on dojo's shrink safe can be found at http://netspurt.com

    0 讨论(0)
  • 2020-12-12 18:50

    What you are describing is an "obfuscator" not a minifier, and they are easily found by searching for "Javascript obfuscator".

    Our SD Thicket ECMAScript Obfuscator both obfuscates and minifies at the same time.

    0 讨论(0)
  • 2020-12-12 19:00

    There's also a .NET port of YUI Compressor which allows you to:-

    • intergrate the minification/file combining into Visual Studio post-build events
    • intergrate into a TFS Build (including CI)
    • if you wish to just use the dll's in your own code (eg. on the fly minification).
    0 讨论(0)
  • 2020-12-12 19:06

    Google has now opened up the minifier they use along with some other internal javascript goodies.

    It's all under the name "Closure Tools" and was announced earlier this month.

    0 讨论(0)
  • 2020-12-12 19:07

    Here are the minifiers I know of: Dean Edwards' packer; YUI Compressor; JSMIN; and Dojo compressor

    In addition to these, the GWT compiler does quite a bit to make efficient JavaScript files out of Java files. It wouldn't surprise me if that is what they use.

    0 讨论(0)
  • 2020-12-12 19:09

    I believe that YUICompressor does #1, except for the function names, and #2 using a special syntax that is removed during compression.

    #3 is just a build task, not a function of the compressor.

    YUICompressor

    0 讨论(0)
提交回复
热议问题