.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. .TH BABEL-MINIFY "1" "November 2022" "babel-minify 0.5.2" "User Commands" .SH NAME babel-minify \- ES6+ aware minifier based on the Babel toolchain .SH DESCRIPTION .IP Usage: minify index.js [options] .IP IO Options: .TP \fB\-\-out\-file\fR, \fB\-o\fR Output to a specific file .TP \fB\-\-out\-dir\fR, \fB\-d\fR Output to a specific directory .IP Parser/Generator options .TP \fB\-\-sourceType\fR Indicate the mode the code should be parsed in. Valid options are "script" | "module" | "unambiguous" .TP \fB\-\-comments\fR Enable/Disable comments in the output. For more specific control, use the Node API .IP Transform Options: .TP \fB\-\-mangle\fR Context and scope aware variable renaming .TP \fB\-\-simplify\fR Simplifies code for minification by reducing statements into expressions .TP \fB\-\-booleans\fR Transform boolean literals into !0 for true and !1 for false .TP \fB\-\-builtIns\fR Minify standard built\-in objects .TP \fB\-\-consecutiveAdds\fR Inlines consecutive property assignments, array pushes, etc. .TP \fB\-\-deadcode\fR Inlines bindings and tries to evaluate expressions. .TP \fB\-\-evaluate\fR Tries to evaluate expressions and inline the result. Deals with numbers and strings .TP \fB\-\-flipComparisons\fR Optimize code for repetition\-based compression algorithms such as gzip. .TP \fB\-\-infinity\fR Minify Infinity to 1/0 .TP \fB\-\-memberExpressions\fR Convert valid member expression property literals into plain identifiers .TP \fB\-\-mergeVars\fR Merge sibling variables into single variable declaration .TP \fB\-\-numericLiterals\fR Shortening of numeric literals via scientific notation .TP \fB\-\-propertyLiterals\fR Transform valid identifier property key literals into identifiers .TP \fB\-\-regexpConstructors\fR Change RegExp constructors into literals .TP \fB\-\-removeConsole\fR Removes all console.* calls .TP \fB\-\-removeDebugger\fR Removes all debugger statements .TP \fB\-\-removeUndefined\fR Removes rval's for variable assignments, return arguments from functions that evaluate to undefined .TP \fB\-\-replace\fR Replaces matching nodes in the tree with a given replacement node .TP \fB\-\-simplifyComparisons\fR Convert === and !== to == and != if their types are inferred to be the same .TP \fB\-\-typeConstructors\fR Minify constructors to equivalent version .TP \fB\-\-undefinedToVoid\fR Transforms undefined into void 0 .IP Other Options: .TP \fB\-\-keepFnName\fR Preserve Function Name (useful for code depending on fn.name) .TP \fB\-\-keepClassName\fR Preserve Class Name (useful for code depending on c.name) .TP \fB\-\-keepFnArgs\fR Don't remove unused fn arguments (useful for code depending on fn.length) .TP \fB\-\-tdz\fR Detect usages of variables in the Temporal Dead Zone .IP Nested Options: .IP To use nested options (plugin specfic options) simply use the pattern \fB\-\-pluginName\fR.featureName. .IP For example, minify index.js \fB\-\-mangle\fR.keepClassName \fB\-\-deadcode\fR.keepFnArgs \fB\-\-outFile\fR index.min.js