{"id":72,"date":"2006-01-18T19:14:00","date_gmt":"2006-01-18T19:14:00","guid":{"rendered":"http:\/\/blog.trungson.com\/?p=72"},"modified":"2006-01-18T19:14:00","modified_gmt":"2006-01-18T19:14:00","slug":"javascript-compression-with-dojo-rhino","status":"publish","type":"post","link":"http:\/\/blog.trungson.com\/?p=72","title":{"rendered":"JavaScript compression with Dojo Rhino"},"content":{"rendered":"<p>http:\/\/dojotoolkit.org\/~alex\/js_with_compress.jar<\/p>\n<p>This is a modified version of Rhino (the Mozilla JS interpreter written in Java). We (the Dojo project) have added a \u201ccompressor\u201d method to the built-in Decompile class. Since we\u2019re operating on the token stream from the parser, this system is somewhat less prone to errors and \u201coverzealousness\u201d. A new \u201c-c\u201d flag sends the \u201ccompressed\u201d version of the input to stderr. Normal invocation is:<\/p>\n<pre>java -jar js_with_compress.jar -c in.js > out.js 2>&1<\/pre>\n<p>This tool will NOT mangle your public APIs. We\u2019re using it as a part of the build process in Dojo and it\u2019s been working well for some time now. It\u2019s much less error prone than the regexp-based stripper we used in netWindows.<\/p>\n<p>Source for the tool (i.e., a zipped up version of my anonymous CVS checkout) is available in the same directory as the Jar file.<\/p>\n<p>Regards<\/p>\n<p>Comment by Alex Russell<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/dojotoolkit.org\/~alex\/js_with_compress.jar This is a modified version of Rhino (the Mozilla JS interpreter written in Java). We (the Dojo project) have added a \u201ccompressor\u201d method to the built-in Decompile class. Since we\u2019re operating on the token stream from the parser, this system is somewhat less prone to errors and \u201coverzealousness\u201d. A new \u201c-c\u201d flag sends the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/72"}],"collection":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=72"}],"version-history":[{"count":0,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/72\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}