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