{"_id":"minifyjs","_rev":"17-9b6da2301c632c346b2d8504a8ff2a01","name":"minifyjs","description":"A node-based javascript minifier/beautifier.","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"minifyjs","author":{"name":"Clark Fischer - https://github.com/clarkf"},"version":"0.0.1","main":"index","bin":{"minifyjs":"./bin/minify"},"engines":{"node":"*"},"description":"A node-based javascript minifier/beautifier.","homepage":"http://github.com/clarkf/minifyjs","directories":{"lib":"lib"},"_id":"minifyjs@0.0.1","_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.1-pre","dist":{"shasum":"8dc757d209b8a0803397148201e1c4b9b8385598","tarball":"https://registry.npmjs.org/minifyjs/-/minifyjs-0.0.1.tgz","integrity":"sha512-Dix5tg2iOb/dnJd3cnIJWu8KyYMYK2Akw+JL++BXc+iddyV2ZvdH2YieiqkKz4Qw8CMRK900yvdC7OQvWiQbtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHrsVQRwxne+HlR4aiGb05VtNu/Wb+eCIuD5gXS/mYztAiAAq78EF1RZrVwBOF48ihqCcOKj1Rp3UXUKN2yNQSg5xw=="}]}},"0.0.5":{"name":"minifyjs","author":{"name":"Clark Fischer - https://github.com/clarkf"},"version":"0.0.5","main":"lib/minify","bin":{"minifyjs":"./bin/minify"},"engines":{"node":"*"},"description":"A node-based javascript minifier/beautifier.","homepage":"http://github.com/clarkf/minifyjs","directories":{"lib":"lib"},"_id":"minifyjs@0.0.5","_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.1-pre","dist":{"shasum":"7464914cf83cdf87e4fa1c976ea8b2223126456e","tarball":"https://registry.npmjs.org/minifyjs/-/minifyjs-0.0.5.tgz","integrity":"sha512-f+cf4fQfPnF3oD1ygnctjsPvqUworPKtLGAt6uxg4mpXBjwEIg70yXomSQkpKvPD4Y6R+y9aHjW4G9YgkVN41g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDChsnrJtQcsSkUTuEOPecmKYG+afUXDFo/BDYqtXylKwIgC3f8TTepWXzW0zl2S4zzsw5mCRGkdl2IpVPwqp7Pmng="}]}},"0.0.6":{"name":"minifyjs","author":{"name":"Clark Fischer"},"version":"0.0.6","main":"lib/minify","keywords":["minify","minifier","min","minification","uglify","gcc","closure","yui"],"bin":{"minifyjs":"./bin/minify"},"engines":{"node":"*"},"description":"A node-based javascript minifier/beautifier.","homepage":"http://github.com/clarkf/minifyjs","directories":{"lib":"lib","bin":"./bin"},"repository":{"type":"git","url":"http://github.com/clarkf/minifyjs.git"},"dependencies":{"uglify-js":">=0.0.2","yui-compressor":">=0.1.1"},"_id":"minifyjs@0.0.6","_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.7","modules":{"b/minify_engines.js":"lib/minify_engines.js","b/minify.js":"lib/minify.js","b/beautify_engines.js":"lib/beautify_engines.js","b/js-beautify.js":"lib/js-beautify.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"ff57e2066a9bfa1f45880e540bc6d658776d7eae","tarball":"https://registry.npmjs.org/minifyjs/-/minifyjs-0.0.6.tgz","integrity":"sha512-8boIgrDqat8zZuoT9YPiOvEFC/hIfSNJd8LwKAiK41cV/lWRH6ilIPxS9ZnXFD3WDIpJZq8l7xqjghPK5o6QYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBoMnwX0gjD3BRwYCUogNDyiSK/gVotjibXUYRhEyvILAiEAxT2KMn3fLjFhIffQbdOm8fZqFA60W2DDzctpsrk98A0="}]}},"0.1.0":{"name":"minifyjs","author":{"name":"Clark Fischer"},"version":"0.1.0","main":"lib/minify.js","keywords":["minify","minifier","min","minification","uglify","gcc","closure","yui"],"bin":{"minifyjs":"./bin/minify"},"scripts":{"test":"node test/test_lib.js"},"engines":{"node":"*"},"description":"A node-based javascript minifier/beautifier.","homepage":"http://github.com/clarkf/minifyjs","directories":{"lib":"lib"},"repository":{"type":"git","url":"git://github.com/clarkf/minifyjs.git"},"dependencies":{"uglify-js":">=0.0.2","yui-compressor":">=0.1.1","closure-compiler":">=0.1.0","beautifyjs":"","step":"","nopt":"*"},"_npmJsonOpts":{"file":"/home/clark/.npm/minifyjs/0.1.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"minifyjs@0.1.0","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"3eb79e0ba40c2799b5c3c9cdb9b0d35374f12168","tarball":"https://registry.npmjs.org/minifyjs/-/minifyjs-0.1.0.tgz","integrity":"sha512-JWj4hWqw6I5yG5KKTg2sYO1DUXaJKG4dEVtbKuNRNkDDRXjnob8vljBrth4TUkNrK8imvuXhkGABHNkMwEn8Vw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbtRaShVcZ9d6kn2p/dXELnl7+1o92JJ58niJJETkLOAIgS26g1ayw41F/VRwXeL7qlivPIDzZWv1tUFiCKFLuvWo="}]},"maintainers":[{"name":"clarkf","email":"clark.fischer@gmail.com"}]},"0.2.0":{"name":"minifyjs","author":{"name":"Clark Fischer"},"version":"0.2.0","main":"lib/minify.js","keywords":["minify","minifier","min","minification","uglify","gcc","closure","yui"],"bin":{"minifyjs":"./bin/minify"},"scripts":{"test":"./node_modules/.bin/mocha test/*.js test/minifiers/*.js test/beautifiers/*.js"},"engines":{"node":">= 0.6"},"description":"A node-based javascript minifier/beautifier.","homepage":"http://github.com/clarkf/minifyjs","directories":{"lib":"lib"},"repository":{"type":"git","url":"git://github.com/clarkf/minifyjs.git"},"dependencies":{"uglify-js":"~2.2","yuicompressor":"~2.4","closure-compiler":"~0.2","js-beautify":"~0.4","optimist":"~0.3"},"devDependencies":{"mocha":"~1.8","expect.js":"~0.2","sinon":"~1.6"},"_npmUser":{"name":"clarkf","email":"clark.fischer@gmail.com"},"_id":"minifyjs@0.2.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"1f06f3bf907795a72fe9213cee08a132a31a3c43","tarball":"https://registry.npmjs.org/minifyjs/-/minifyjs-0.2.0.tgz","integrity":"sha512-7yyb3L3t28hggfz0eRZ/2+RCmR+NOvedkAPA/8y7k8C2YsXsB4089L2/jT7NF+5DVJ3Fg8HCHGoUP80Z0o1EWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGP2Zjh7iIxJkmSFPhNQQiacgZq+DfhCYwI9JiLSJwhHAiEArXvuzRvscxyEkayMlqHf7EwLH2nvTTNgFvBCF/vyoHM="}]},"readme":"# minifyjs — A node minifier\n\n<https://github.com/clarkf/minifyjs>\n[![Build Status](https://travis-ci.org/clarkf/minifyjs.png?branch=master)](https://travis-ci.org/clarkf/minifyjs)\n\n\n`minifyjs` is a Javascript code minifier written for node. It's aim is flexibility.\n\n## Installation\n\n\nminifyjs is an [npm](http://npmjs.org) package. You should be able to install it using\n\n    npm install minifyjs\n    \nTo install the `minifyjs` command, use\n\n    npm install -g minifyjs\n\nThis will install the current stable version. To install the latest development version, clone this repository and install it.\n\n    git clone git://github.com/clarkf/minifyjs.git\n    cd minifyjs\n    npm install -g\n\nCongratulations! You're half way to the minified files of your dreams.\n\n## Use\n\nYou can use minifyjs from the command line.\n\n    minifyjs [arguments] [-b/m] [-i path/input.js] [-o path/output.js]\n\nPossible arguments\n\n* `-b` or `--beautify` — Beautify code. The opposite of minifying code.\n* `-m` or `--minify` — Minify code. Available options for the minification engine\n* `-e` or `--engine E` — Specify an engine. If left unspecified, it defaults to 'best', for minification, or 'js-beautify' for beautification. For a list of available engines, see Engine section below.\n* `-l I` or `--level I` — Specify a minification level (does not apply to beautification). Generally, there are three levels available:\n    * `0` — Strips whitespace, leaves code intact (depending on engine)\n    * `1` — Simple optimizations. Changes code slightly without deep optimization. Probably what you'll want for most code.\n    * `2` — Advanced optimizations.\n* `-o` or `--output` — Write data to a specific file instead of outputting to `STDOUT`.\n\nThe concept here is for use within larger projects. You can easily integrate this into your workflow using:\n\n    minifyjs -m mycode.js > mycode.min.js\n\nThis will create a file called mycode.min.js containing the smallest minified version available (see `best` engine explanation below).\n\nOr, with a specific engine:\n\n    minifyjs -m -e uglify mycode.js\n\nOr, beautify with a specific engine:\n\n    minifyjs -b -e js-beautify mycode.js\n\n## Engines\n\n### Minification engines\nCurrently, minifyjs only supports two engines for minification:\n\n* `uglify` — Mihai Bazon's amazing [UglifyJS2](https://github.com/mishoo/UglifyJS2).\n* `gcc` — [Google Closure Compiler](http://code.google.com/closure/compiler/) via Tim Smart's [`node-closure`](https://github.com/Tim-Smart/node-closure). See their [API Reference](http://code.google.com/closure/compiler/docs/api-ref.html) for details.\n* `yui` — YUI Compressor. This is currently done through Tim Smart's [`node-yui-compressor`](https://github.com/Tim-Smart/node-yui-compressor) module. Currently, minification levels are ignored.\n* `best` — Custom engine which calls all other engines and compares their output. It finds the smallest (most minified) code, and returns it.\n\n### Beautification engines\n* `uglify` — Mihai Bazon's amazing [UglifyJS2](https://github.com/mishoo/UglifyJS2).\n* `js-beautify` — Einar Lielmanis' [js-beautify](https://github.com/einars/js-beautify).\n\n## API\n\nIf you'd like to use minifyjs programmatically, you can do so by using `require('minifyjs')`. Currently, the API looks like this:\n\n    mjs = require('minifyjs');\n    \n    //Minify some code\n    mjs.minify(code, options, callback);\n    \n    //Beautify some code\n    mjs.beautify(code, options, callback);\n\nWhere\n\n* `code` is a [`stream.Readable`](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_readable) containing the code to be processed.\n* `options` is a key/value hash. Options include: `engine` (the engine\n  to use), `level` (Level of minification. The lower, the less minified).\n* `callback` is a `Function` to be called once the code is returned from the engine. It's passed back in the format `callback(error, code);`\n\nNode that a callback is required because some methods (read: gcc) require asynchronous calls. In order to support this sort of engine, all code comes from callbacks. A good example may be:\n\n    var myCode = \"...codehere...\";\n    function presentCode(error, code) {\n        if (error) {\n            throw error;\n        }\n        //Present the code to the user...\n    }\n    require('minifyjs').minify(myCode, { engine: 'yui' }, presentCode);\n\n## Conclusion\n\nEnjoy! Please fork, push and file issues as desired. Feel free to\ncontribute!\n","maintainers":[{"name":"clarkf","email":"clark.fischer@gmail.com"}]}},"maintainers":[{"name":"clarkf","email":"clark.fischer@gmail.com"}],"author":{"name":"Clark Fischer"},"repository":{"type":"git","url":"git://github.com/clarkf/minifyjs.git"},"time":{"modified":"2022-06-19T21:09:50.821Z","created":"2011-01-21T03:30:19.218Z","0.0.1":"2011-01-21T03:30:19.218Z","0.0.5":"2011-01-21T03:30:19.218Z","0.0.6":"2011-01-21T03:30:19.218Z","0.1.0":"2011-09-14T03:35:48.545Z","0.2.0":"2013-03-28T19:57:50.801Z"}}