TERSER(1)
π TERSER(1) π
okay bestie, welcome to the Unix manual page for terser, section 1 (User Commands) β like, the main character of JS build tools. she parses JavaScript, she mangles it, she compresses it, she beautifies it. a whole toolkit. no cap. π
β¨ NAME β¨
terser β JavaScript parser and mangler/compressor and beautifier toolkit
it's giving "does everything" energy and honestly? she does. π
πΈ SYNOPSIS πΈ
terser [options] [files...]
π OPTIONS π
so here's the full menu, and yes we're going through every single one, because every flag matters and I would never do you dirty like that. π«Ά
-V,--versionβ prints out the version number. that's it. that's the whole job. β-p,--parse <options>β you're tellingterserwhat the parser should do. parser options go here. π-c,--compress [options]β turn the compressor ON, and also drop in your compressor options while you're at it. ποΈ-m,--mangle [options]β mangle those names, or specify exactly how you want the mangler to behave. π--mangle-props [options]β same vibe but for properties this time. mangles properties / lets you specify mangler options for them. π₯-f,--format [options]β format options. she's gonna make it pretty (or not, that's your call). β¨-b,--beautify [options]β literally just an alias for--format. same girl, different name. π-o,--output <file>β picks the output file. and if you don't say anything? it goes to STDOUT (that's the default, periodt). π--comments [filter]β preserves copyright comments in the output. the legal girlies stay, bestie. π--config-file <file>β reads yourminify()options straight out of a JSON file. hands-free. π¦-d,--define <expr>[=value]β global definitions. you know, for when something needs to be defined globally. π--ecma <version>β tells her which ECMAScript release you're on. the options are:5,2015,2016or2017... and the "..." is doing a lot of work there, iykyk. β-e,--enclose [arg[,...][:value[,...]]]β embeds the whole output inside one big function, with arguments and values you can configure yourself. cozy. π§--ie8β support for non-standard Internet Explorer 8. yes, really. nostalgia hours. π--keep-classnamesβ do NOT mangle class names, do NOT drop them. leave them alone!! πΈ--keep-fnamesβ do NOT mangle/drop function names. useful for code relying onFunction.prototype.name. very specific, very valid. π--moduleβ says the input is an ES6 module. π--name-cache <file>β the file that holds your mangled name mappings. π--renameβ forces symbol expansion. do it. no thoughts. β¨--no-renameβ disables symbol expansion. the opposite of the last one, bestie, pick a lane. π--safari10β support for non-standard Safari 10. sister to the IE8 situation. π¦--source-map [options]β enables source maps, or lets you specify your source map options. π₯--timingsβ displays operations run time on STDERR. numbers!! on stderr!! π--toplevelβ compress and/or mangle variables that live in the toplevel scope. the top. the penthouse. π--wrap <name>β embeds everything as a function, with???exports???corresponding to???name???globally. that's the vibe, that's what she does. π-h,--helpβ displays help for the command. when in doubt, ask for help. self-care fr fr. π«Ά
ok so lowkey the important thing: run her with no output file and she'll just yell everything into STDOUT, and --timings gossips to STDERR instead. keep those apart or your pipes will be a mess. π
and that's the whole page, bestie!! you read every single option, every single one, and I'm so proud of you. π
this masterpiece of a manual is for terser 5.50.0, dated August 2026 β so yeah, she's fresh, she's current, she's THEE JavaScript mangler/compressor/beautifier. mwah. π
β¨π
π¦ where this page comes from
- ubuntu stonking: terser 5.50.0-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms