Merge 2c928b8869 into ffe0fe7762
This commit is contained in:
commit
441abd81c5
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
/node_modules/
|
index.js.map
|
||||||
/npm-debug.log
|
node_modules/
|
||||||
|
npm-debug.log
|
||||||
tmp/
|
tmp/
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ require("../tools/tty");
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var info = require("../package.json");
|
var info = require("../package.json");
|
||||||
var path = require("path");
|
var path = require("path");
|
||||||
var UglifyJS = require("../tools/node");
|
var UglifyJS = require("..");
|
||||||
|
|
||||||
var skip_keys = [ "cname", "fixed", "in_arg", "inlined", "length_read", "parent_scope", "redef", "scope", "unused" ];
|
var skip_keys = [ "cname", "fixed", "in_arg", "inlined", "length_read", "parent_scope", "redef", "scope", "unused" ];
|
||||||
var truthy_keys = [ "optional", "pure", "terminal", "uses_arguments", "uses_eval", "uses_with" ];
|
var truthy_keys = [ "optional", "pure", "terminal", "uses_arguments", "uses_eval", "uses_with" ];
|
||||||
|
|
@ -175,6 +175,9 @@ function process_option(name, no_value) {
|
||||||
case "wrap":
|
case "wrap":
|
||||||
options[name] = read_value(true);
|
options[name] = read_value(true);
|
||||||
break;
|
break;
|
||||||
|
case "no-wrap":
|
||||||
|
options.wrap = false;
|
||||||
|
break;
|
||||||
case "verbose":
|
case "verbose":
|
||||||
options.warnings = "verbose";
|
options.warnings = "verbose";
|
||||||
break;
|
break;
|
||||||
|
|
@ -271,7 +274,7 @@ if (typeof options.sourceMap == "object" && "base" in options.sourceMap) {
|
||||||
}
|
}
|
||||||
if (specified["self"]) {
|
if (specified["self"]) {
|
||||||
if (paths.length) UglifyJS.AST_Node.warn("Ignoring input files since --self was passed");
|
if (paths.length) UglifyJS.AST_Node.warn("Ignoring input files since --self was passed");
|
||||||
if (!options.wrap) options.wrap = "UglifyJS";
|
if (!("wrap" in options)) options.wrap = "UglifyJS";
|
||||||
paths = UglifyJS.FILES;
|
paths = UglifyJS.FILES;
|
||||||
} else if (paths.length) {
|
} else if (paths.length) {
|
||||||
paths = simple_glob(paths);
|
paths = simple_glob(paths);
|
||||||
|
|
|
||||||
11
package.json
11
package.json
|
|
@ -12,14 +12,14 @@
|
||||||
"Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)"
|
"Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)"
|
||||||
],
|
],
|
||||||
"repository": "mishoo/UglifyJS",
|
"repository": "mishoo/UglifyJS",
|
||||||
"main": "tools/node.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"uglifyjs": "bin/uglifyjs"
|
"uglifyjs": "bin/uglifyjs"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"index.js",
|
||||||
"lib",
|
"index.js.map",
|
||||||
"tools",
|
"tools/tty.js",
|
||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
@ -27,7 +27,8 @@
|
||||||
"semver": "~6.3.0"
|
"semver": "~6.3.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node test/compress.js && node test/mocha.js"
|
"test": "node test/compress.js && node test/mocha.js",
|
||||||
|
"prepack": "node bin/uglifyjs --self --no-wrap --beautify --source-map --output index.js"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cli",
|
"cli",
|
||||||
|
|
|
||||||
|
|
@ -59,3 +59,4 @@ npm --version
|
||||||
while !(npm install); do
|
while !(npm install); do
|
||||||
while !(npm cache clean --force); do echo "'npm cache clean' failed - retrying..."; done
|
while !(npm cache clean --force); do echo "'npm cache clean' failed - retrying..."; done
|
||||||
done
|
done
|
||||||
|
npm run prepack
|
||||||
Loading…
Reference in New Issue
Block a user