{"_id":"@browserify/uglifyify","name":"@browserify/uglifyify","dist-tags":{"latest":"6.0.0"},"versions":{"6.0.0":{"name":"@browserify/uglifyify","version":"6.0.0","description":"A browserify transform which minifies your code using Terser","main":"index.js","dependencies":{"convert-source-map":"^1.9.0","minimatch":"^3.0.2","terser":"^5.15.1","through2":"^4.0.2","xtend":"^4.0.1"},"devDependencies":{"bl":"^5.0.0","browserify":"^17.0.0","from2-string":"^1.1.0","standard":"^17.0.0","tap-spec":"^5.0.0","tape":"^5.6.1","uglify-js":"^3.17.3","wrap-stream":"^2.0.0"},"scripts":{"tests-only":"node test | tap-spec","lint":"standard","test":"npm run lint && npm run tests-only"},"repository":{"type":"git","url":"git://github.com/browserify/uglifyify.git"},"keywords":["uglify","minify","compress","compile","browserify","transform","stream"],"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughskennedy.com/"},"license":"MIT","gitHead":"34ffc809e0264067554214c528d8c4db9468a8e2","bugs":{"url":"https://github.com/browserify/uglifyify/issues"},"homepage":"https://github.com/browserify/uglifyify#readme","_id":"@browserify/uglifyify@6.0.0","_nodeVersion":"18.11.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-48M2a3novsgKhUSo/B3ja10awc7unliK1HfW6aYBJdLFQj3wXDx9BBJVfj6MVYERSQVEVjNHQQ7IK89h4MpCLw==","shasum":"ba03c43ca9ae72b4d2fb751083de87faa51460c7","tarball":"https://registry.npmjs.org/@browserify/uglifyify/-/uglifyify-6.0.0.tgz","fileCount":8,"unpackedSize":17443,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH3Jq2KP3u0kCLbeDYX3+a63f0h9cFi2J4KLSFoCNEGyAiEAxxyYVEhhNdAjRZe+Lb0eBPjIJ2hVKnkYxbWGbZcq6MU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjS9pfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonPw/+OeUBhsL/NOzZRRmG5q8/ODx2Ml7t1xj3oVgXm/E4fsesuNaH\r\nsNfb9vZqPRaVs7a9pWf7NEhpy2M/z5W1DCXY0IgTvkO1csi7XPCRvjCNi5QU\r\nDlDp/3tTzAMHvaMLs4QEIFib/N/vYS8oxCJreENAmXW2S3HdzngQLb4LdzoR\r\n8SH+n/3ygBqeLNQrhVLF+QUfWH4XaDnfyleakLywxxiVFdVx2ZAVWqISMUGU\r\nJeiMmGymzwv3pNpk/izuWQkplLYKheZUnh+3xRroQPZQ3yO+5tPnYOKzq/rj\r\nuatQRi9aDriks5zP0NGMSeG6WESojHW7lozaUnrdL1y5UjQy81PnHqqHt7Bw\r\nbHQqI1xcGkryf1pEEtwbiTtRMgswVhYh6r8S8LlOxM4JPV5WABi3m0Pl4nZz\r\neAKHWgCvMxdeb2d72WtAhK8m6+Bkc52wRfjfcoLDtxfAZlivoBfq58ptYR7B\r\nNY1oo1QKx15zFOE7vYxGzj9yyYO/h+IyT0MQknY2tT3hMk5ZX7jfYzqUA+6m\r\nYiWmjJtQp3dDv70Nc+o7BaqxU4AnsAJhkX1CHt4A/EcDRcxFN+deMgkFIiOd\r\n9GTTU45dLp9JTy9ErUA8buPZBpFo0aFN+isuQnS9XYGZ7sZAXjQid5NnHZBy\r\nmlF5AJq9pEJWLPGbLX8B1CSt4RM7SkLo9l0=\r\n=1aLB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"goto-bus-stop","email":"renee@kooi.me"},"directories":{},"maintainers":[{"name":"feross","email":"feross@feross.org"},{"name":"gkatsev","email":"me@gkatsev.com"},{"name":"zertosh","email":"zertosh@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"maxogden","email":"max@maxogden.com"},{"name":"thlorenz","email":"thlorenz10@gmail.com"},{"name":"terinjokes","email":"terinjokes@gmail.com"},{"name":"jmm","email":"npm-public@jessemccarthy.net"},{"name":"mellowmelon","email":"palmermebane@gmail.com"},{"name":"ashaffer88","email":"darawk@gmail.com"},{"name":"balupton","email":"b@lupton.cc"},{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"jprichardson","email":"jprichardson@gmail.com"},{"name":"indutny","email":"blackhole@livebox.sh"},{"name":"jryans","email":"jryans@gmail.com"},{"name":"sethvincent","email":"sethvincent@gmail.com"},{"name":"yoshuawuyts","email":"javascript@yosh.is"},{"name":"ungoldman","email":"ungoldman@gmail.com"},{"name":"ahdinosaur","email":"michael.williams@enspiral.com"},{"name":"elnounch","email":"contact@elnounch.net"},{"name":"parshap","email":"parshap+npm@gmail.com"},{"name":"yerkopalma","email":"yerko.palma@usach.cl"},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},{"name":"garann","email":"garann@gmail.com"},{"name":"bret","email":"bcomnes@gmail.com"},{"name":"anandthakker","email":"vestibule@anandthakker.net"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"fpereira1","email":"pereira.filype@gmail.com"},{"name":"goto-bus-stop","email":"renee@kooi.me"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"emilbayes","email":"github@tixz.dk"},{"name":"stevemao","email":"maochenyan@gmail.com"},{"name":"pkrumins","email":"peteris.krumins@gmail.com"},{"name":"tehshrike","email":"me@JoshDuff.com"},{"name":"defunctzombie","email":"shtylman@gmail.com"},{"name":"lukechilds","email":"lukechilds123@gmail.com"},{"name":"raynos","email":"raynos2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uglifyify_6.0.0_1665915487123_0.48796069538476194"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-16T10:18:07.075Z","6.0.0":"2022-10-16T10:18:07.308Z","modified":"2022-10-16T10:18:07.727Z"},"maintainers":[{"name":"feross","email":"feross@feross.org"},{"name":"gkatsev","email":"me@gkatsev.com"},{"name":"zertosh","email":"zertosh@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"maxogden","email":"max@maxogden.com"},{"name":"thlorenz","email":"thlorenz10@gmail.com"},{"name":"terinjokes","email":"terinjokes@gmail.com"},{"name":"jmm","email":"npm-public@jessemccarthy.net"},{"name":"mellowmelon","email":"palmermebane@gmail.com"},{"name":"ashaffer88","email":"darawk@gmail.com"},{"name":"balupton","email":"b@lupton.cc"},{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"jprichardson","email":"jprichardson@gmail.com"},{"name":"indutny","email":"blackhole@livebox.sh"},{"name":"jryans","email":"jryans@gmail.com"},{"name":"sethvincent","email":"sethvincent@gmail.com"},{"name":"yoshuawuyts","email":"javascript@yosh.is"},{"name":"ungoldman","email":"ungoldman@gmail.com"},{"name":"ahdinosaur","email":"michael.williams@enspiral.com"},{"name":"elnounch","email":"contact@elnounch.net"},{"name":"parshap","email":"parshap+npm@gmail.com"},{"name":"yerkopalma","email":"yerko.palma@usach.cl"},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},{"name":"garann","email":"garann@gmail.com"},{"name":"bret","email":"bcomnes@gmail.com"},{"name":"anandthakker","email":"vestibule@anandthakker.net"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"fpereira1","email":"pereira.filype@gmail.com"},{"name":"goto-bus-stop","email":"renee@kooi.me"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"emilbayes","email":"github@tixz.dk"},{"name":"stevemao","email":"maochenyan@gmail.com"},{"name":"pkrumins","email":"peteris.krumins@gmail.com"},{"name":"tehshrike","email":"me@JoshDuff.com"},{"name":"defunctzombie","email":"shtylman@gmail.com"},{"name":"lukechilds","email":"lukechilds123@gmail.com"},{"name":"raynos","email":"raynos2@gmail.com"}],"description":"A browserify transform which minifies your code using Terser","homepage":"https://github.com/browserify/uglifyify#readme","keywords":["uglify","minify","compress","compile","browserify","transform","stream"],"repository":{"type":"git","url":"git://github.com/browserify/uglifyify.git"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughskennedy.com/"},"bugs":{"url":"https://github.com/browserify/uglifyify/issues"},"license":"MIT","readme":"# @browserify/uglifyify\n\nA [Browserify](http://browserify.org) transform which minifies your code\nusing [terser](https://github.com/fabiosantoscode/terser).\n\n## Installation\n\n``` bash\nnpm install @browserify/uglifyify\n```\n\n## Motivation/Usage\n\nOrdinarily you'd be fine doing this:\n\n``` bash\nbrowserify index.js | terser -c > bundle.js\n```\n\nBut uglifyify is able to yield smaller output by processing files individually\ninstead of just the entire bundle. When using uglifyify you should generally\n**also** use Uglify, to achieve the smallest output. Uglifyify provides an\nadditional optimization when used with Uglify, but does not provide all of the\noptimization that using Uglify on its own does, so it's not a replacement.\n\nUglifyify gives you the benefit of applying Uglify's \"squeeze\" transform on each\nfile *before* it's included in the bundle, meaning you can remove dead code\npaths for conditional requires. Here's a contrived example:\n\n``` javascript\nif (true) {\n  module.exports = require('./browser')\n} else {\n  module.exports = require('./node')\n}\n```\n\n`module.exports = require('./node')` will be excluded by Uglify, meaning that\nonly `./browser` will be bundled and required.\n\nIf you combine uglifyify with [envify](http://github.com/hughsk/envify), you\ncan make this a little more accessible. Take this code:\n\n``` javascript\nif (process.env.NODE_ENV === 'development') {\n  module.exports = require('./development')\n} else {\n  module.exports = require('./production')\n}\n```\n\nAnd use this to compile:\n\n``` bash\nNODE_ENV=development browserify -t envify -t @browserify/uglifyify index.js -o dev.js &&\nNODE_ENV=production browserify -t envify -t @browserify/uglifyify index.js -o prod.js\n```\n\nIt should go without saying that you should be hesitant using environment\nvariables in a Browserify module - this is best suited to your own\napplications or modules built with Browserify's `--standalone` tag.\n\n## File Extensions\n\nSometimes, you don't want uglifyify to minify all of your files – for example,\nif you're using a transform to `require` CSS or HTML, you might get an error\nas uglify expects JavaScript and will throw if it can't parse what it's given.\n\nThis is done using the `-x` or `--exts` transform options, e.g. from the\ncommand-line:\n\n``` bash\nbrowserify     \\\n  -t coffeeify \\\n  -t [ @browserify/uglifyify -x .js -x .coffee ]\n```\n\nThe above example will only minify `.js` and `.coffee` files, ignoring the rest.\n\n## Global Transforms\n\nYou might also want to take advantage of uglifyify's pre-bundle minification\nto produce slightly leaner files across your entire browserify bundle. By\ndefault, transforms only alter your application code, but you can use global\ntransforms to minify module code too. From your terminal:\n\n``` bash\nbrowserify -g @browserify/uglifyify ./index.js > bundle.js\n```\n\nOr programatically:\n\n``` javascript\nvar browserify = require('browserify')\nvar fs = require('fs')\n\nvar bundler = browserify(__dirname + '/index.js')\n\nbundler.transform('@browserify/uglifyify', { global: true  })\n\nbundler.bundle()\n  .pipe(fs.createWriteStream(__dirname + '/bundle.js'))\n```\n\nNote that this is fine for uglifyify as it shouldn't modify the behavior of\nyour code unexpectedly, but transforms such as envify should almost always\nstay local – otherwise you'll run into unexpected side-effects within modules\nthat weren't expecting to be modified as such.\n\n## Ignoring Files\n\nSometimes uglifyjs will break specific files under specific settings – it's\nrare, but does happen – and to work around that, you can use the `ignore`\noption. Given one or more glob patterns, you can filter out specific files\nthis way:\n\n``` bash\nbrowserify -g [ @browserify/uglifyify --ignore '**/node_modules/weakmap/*' ] ./index.js\n```\n\n``` javascript\nvar bundler = browserify('index.js')\n\nbundler.transform('@browserify/uglifyify', {\n  global: true,\n  ignore: [\n      '**/node_modules/weakmap/*'\n    , '**/node_modules/async/*'\n  ]\n})\n\nbundler.bundle().pipe(process.stdout)\n```\n\n## Source Maps\n\nUglifyify supports source maps, so you can minify your code and still see the\noriginal source – this works especially well with a tool such as\n[exorcist](https://github.com/thlorenz/exorcist) when creating production\nbuilds.\n\nSource maps are enabled when:\n\n* You're using another transform, such as\n  [coffeeify](https://github.com/jnordberg/coffeeify), that inlines source maps.\n* You've passed the `--debug` flag (or `debug` option) to your browserify\n  bundle.\n\nEnabling `--debug` with browserify is easy:\n\n``` bash\nbrowserify -t @browserify/uglifyify --debug index.js\n```\n``` javascript\nvar bundler = browserify({ debug: true })\n\nbundler\n  .add('index.js')\n  .transform('@browserify/uglifyify')\n  .bundle()\n  .pipe(process.stdout)\n```\n\nIf you'd prefer them not to be included regardless, you can opt out\nusing the `sourcemap` option:\n\n``` bash\nbrowserify -t [ @browserify/uglifyify --no-sourcemap ] app.js\n```\n``` javascript\nvar bundler = browserify('index.js')\n\nbundler.transform('@browserify/uglifyify', { sourceMap: false })\n  .bundle()\n  .pipe(process.stdout)\n```\n","readmeFilename":"README.md"}