Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uglifyify

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uglifyify - npm Package Compare versions

Comparing version 2.0.0 to 2.1.1

16

index.js
var convert = require('convert-source-map')
, through = require('through')
, path = require('path')
, ujs = require('uglify-js')
module.exports = uglifyify
function uglifyify(file) {
function uglifyify(file, opts) {
opts = opts || {}
var buffer = ''
var exts = []
.concat(opts.exts || [])
.concat(opts.x || [])
if (/\.json$/.test(file)) return through()
if (
/\.json$/.test(file) ||
exts.length &&
exts.indexOf(path.extname(file)) === -1
) {
return through()
}

@@ -11,0 +23,0 @@ return through(function write(chunk) {

2

package.json
{
"name": "uglifyify",
"version": "2.0.0",
"version": "2.1.1",
"description": "A browserify transform which minifies your code using UglifyJS2",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -57,2 +57,19 @@ # uglifyify

## File Extensions
Sometimes, you don't want uglifyify to minify all of your files – for example,
if you're using a transform to `require` CSS or HTML, you might get an error
as uglify expects JavaScript and will throw if it can't parse what it's given.
This is done using the `-x` or `--exts` transform options, e.g. from the
command-line:
``` bash
browserify \
-t coffeeify \
-t [ uglifyify -x .js -x .coffee ]
```
The above example will only minify `.js` and `.coffee` files, ignoring the rest.
## Global Transforms

@@ -59,0 +76,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc