TERSER(1)
β¨ NAME β¨
terser β it's a toolkit, bestie π that's the whole vibe. A whole lil toolbox for squishing your JavaScript down to its smallest, most efficient self.
π SYNOPSIS π
uglifyjs [options] [files...]
okay so lowkey the binary is called uglifyjs, not terser, and yes that's iconic of it π«Ά you run it, you hand it some [options], you hand it some [files...], and it does its thing.
π OPTIONS π
grab a snack, this is the main character section π
-V,--versionβ spits out the version number, that's it, that's the whole job π«-p,--parse <options>β lets you specify your parser options π§-c,--compress [options]β turns the compressor ON, or lets you specify compressor options if you wanna get specific β¨-m,--mangle [options]β mangles names, or lets you specify mangler options π₯--mangle-props [options]β mangles properties, or lets you specify mangler options for that π-b,--beautify [options]β beautifies the output, or lets you specify output options π-o,--output <file>β the output file, and no cap the default isSTDOUTπ«Ά--comments [filter]β preserves copyright comments in the output β--config-file <file>β readsminify()options straight out of a JSON file π-d,--define <expr>[=value]β global definitions π--ecma <version>β specifies the ECMAScript release:5,6,7or8π-e,--enclose [arg[,...][:value[,...]]]β embeds your output inside one big function, with configurable arguments and values π§Έ--ie8β supports non-standard Internet Explorer 8 π (yes, really)--keep-classnamesβ do NOT mangle or drop class names, leave them be π--keep-fnamesβ do NOT mangle or drop function names. genuinely useful if your code is relying onFunction.prototype.nameπ--moduleβ the input is an ES6 module π¦--name-cache <file>β the file that holds your mangled name mappings ποΈ--renameβ forces symbol expansion π₯--no-renameβ disables symbol expansion π«--safari10β supports non-standard Safari 10 π--source-map [options]β enables the source map, or lets you specify source map options πΊοΈ--timingsβ displays operations run time onSTDERRβ±οΈ--toplevelβ compresses and/or mangles variables in the toplevel scope π--verboseβ prints diagnostic messages, for when you simply must know everything π--warnβ prints warning messages β οΈ--wrap <name>β embeds everything as a function, with???exports???corresponding to???name???globally π-h,--helpβ displays help for the command, aka the lil hand-holding moment π«Ά
and that's the whole page, you ate that π
this was terser version 4.1.2, dated February 2022, from the User Commands corner of the manual π periodt. β¨
π¦ where this page comes from
- ubuntu jammy: uglifyjs.terser 4.1.2-10 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms