{"name":"esmangle","description":"ECMAScript code mangler / minifier","homepage":"http://github.com/Constellation/esmangle.html","main":"lib/esmangle.js","bin":{"esmangle":"./bin/esmangle.js"},"version":"0.0.17","engines":{"node":">=0.6.0"},"directories":{"lib":"./lib"},"maintainers":[{"name":"constellation","email":"utatane.tea@gmail.com"}],"repository":{"type":"git","url":"http://github.com/Constellation/esmangle.git"},"dependencies":{"esprima":"~ 1.0.2","escope":"~ 1.0.0","escodegen":"~ 0.0.28","estraverse":"~ 1.3.2","source-map":"~ 0.1.8","esshorten":"~ 0.0.2","optimist":"*"},"devDependencies":{"chai":"*","commonjs-everywhere":"0.8.x","grunt":"~0.4.1","grunt-cli":"~0.1.7","grunt-contrib-jshint":"~0.6.0","grunt-mocha-test":"~0.5.0","grunt-contrib-copy":"~0.4.1","grunt-update-submodules":"~0.2.0","grunt-contrib-clean":"~0.4.1","grunt-shell":"~0.2.2","async":"~0.2.8","q":"~0.9.3"},"licenses":[{"type":"BSD","url":"http://github.com/Constellation/esmangle/raw/master/LICENSE.BSD"}],"scripts":{"test":"grunt travis","lint":"grunt lint","regression-test":"grunt test:regression","unit-test":"grunt test","build":"grunt build"},"bugs":{"url":"https://github.com/Constellation/esmangle/issues"},"_id":"esmangle@0.0.17","dist":{"shasum":"4c5c93607cde5d1276bad396e836229dba68d90c","tarball":"http://registry-npm.ywwl.com/esmangle/download/esmangle-0.0.17.tgz","integrity":"sha512-P9riJQ3eRuPnxYGrwHDFHQUv/1U16S/za8rlLwN7Mq06PAAlNX4WMNszbyncLd+G4LVnowGxCTdWriGgf0OO0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF8qhkeKUY9ZtA3VEjkjV3kNHQbRLmZdftD5BiBWBGWSAiEAsp9LFD6RizHrEKYwOmiTu84QiLRFSxKM8HA9bolO5Nw="}],"size":34026,"noattachment":false,"key":"/esmangle/-/esmangle-0.0.17.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"constellation","email":"utatane.tea@gmail.com"},"readme":"# esmangle [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-url]][daviddm-image]\n\nesmangle ([esmangle](http://github.com/Constellation/esmangle)) is\nmangler / minifier for [Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) AST.\n\n### Install\n\nesmangle can be used in a web browser: <a href=\"http://constellation.github.com/esmangle/javascripts/esmangle.js\" target=\"_blank\">Download</a>\n\n    <script src=\"esmangle.js\"></script>\n\n\nNode.js application via the package manager:\n\n    npm install esmangle\n\nIf you would like to use latest esmangle in a browser, you can build `build/esmangle.min.js`:\n\n    npm run-script build\n\n\n### Usage\n\nA simple example: the program\n\n    var ast = esprima.parse(code);\n    var result = esmangle.mangle(ast);  // gets mangled AST\n    console.log(escodegen.generate(result));  // dump AST\n\nOr you can simply use this `esmangle` command in the shell.\n\n    $ esmangle file.js\n\nGet more compressed result: (in Node.js)\n\n    var ast = esprima.parse(code);\n    // Get optimized AST\n    var optimized = esmangle.optimize(ast, null);\n    // gets mangled AST\n    var result = esmangle.mangle(optimized);\n    console.log(escodegen.generate(result, {\n        format: {\n            renumber: true,\n            hexadecimal: true,\n            escapeless: true,\n            compact: true,\n            semicolons: false,\n            parentheses: false\n        }\n    }));  // dump AST\n\n\n### Design\n\nSlide is [here](https://speakerdeck.com/constellation/escodegen-and-esmangle-using-mozilla-javascript-ast-as-an-ir).\nThis resolution algorithm is based on my bytecode compiler [iv / lv5 / railgun](https://github.com/Constellation/iv/tree/master/iv/lv5/railgun).\n\n### License\n\nCopyright (C) 2012 [Yusuke Suzuki](http://github.com/Constellation)\n (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n\n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the\n    documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n[npm-url]: https://npmjs.org/package/esmangle\n[npm-image]: https://badge.fury.io/js/esmangle.png\n[travis-url]: https://travis-ci.org/Constellation/esmangle\n[travis-image]: https://travis-ci.org/Constellation/esmangle.png?branch=master\n[coveralls-url]: https://coveralls.io/r/Constellation/esmangle\n[coveralls-image]: https://coveralls.io/repos/Constellation/esmangle/badge.png\n[depstat-url]: https://david-dm.org/Constellation/esmangle\n[depstat-image]: https://david-dm.org/Constellation/esmangle.png\n[daviddm-url]: https://david-dm.org/Constellation/esmangle.png?theme=shields.io\n[daviddm-image]: https://david-dm.org/Constellation/esmangle\n","publish_time":1383332349782,"_cnpm_publish_time":1383332349782,"dist-tags":{"latest":"1.0.1"}}