fly-uglify
Advanced tools
Comparing version 0.4.0 to 1.0.0
@@ -5,6 +5,7 @@ const assign = require("object-assign") | ||
module.exports = function () { | ||
this.filter("uglify", (source, options) => { | ||
try { return minify(source, assign({ fromString: true }, options)).code } | ||
catch (e) { throw e } | ||
}, { ext: ".js" }) | ||
this.filter("uglify", (data, options) => { | ||
return assign({ ext: ".js" }, minify(data.toString(), assign({ | ||
fromString: true | ||
}, options))) | ||
}) | ||
} |
{ | ||
"name": "fly-uglify", | ||
"version": "0.4.0", | ||
"version": "1.0.0", | ||
"description": "Uglify plugin for Fly", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,8 +7,9 @@ const test = require("tape").test | ||
uglify.call({ | ||
filter: function (name, transform, options) { | ||
filter: function (name, transform) { | ||
const res = transform("/* yay */") | ||
t.equal(name, "uglify", "add uglify filter") | ||
t.ok(/^\s*$/.test(transform("/* yay */")), "uglify transform") | ||
t.equal(options.ext, ".js", "extension is .js") | ||
t.ok(/^\s*$/.test(res.code), "uglify transform") | ||
t.equal(res.ext, ".js", "extension is .js") | ||
} | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
22
1