Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation and type definition: MinifyOptions.enclose #1021

Merged
merged 1 commit into from Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -530,6 +530,11 @@ try {
- `ecma` (default `undefined`) - pass `5`, `2015`, `2016`, etc to override
`compress` and `format`'s `ecma` options.

- `enclose` (default `false`) - pass `true`, or a string in the format
of `"args[:values]"`, where `args` and `values` are comma-separated
argument names and values, respectively, to embed the output in a big
function with the configurable arguments and values.

- `parse` (default `{}`) — pass an object if you wish to specify some
additional [parse options](#parse-options).

Expand Down Expand Up @@ -602,6 +607,7 @@ try {
// source map options
},
ecma: 5, // specify one of: 5, 2015, 2016, etc.
enclose: false, // or specify true, or "args:values"
keep_classnames: false,
keep_fnames: false,
ie8: false,
Expand Down
1 change: 1 addition & 0 deletions tools/terser.d.ts
Expand Up @@ -138,6 +138,7 @@ export enum OutputQuoteStyle {
export interface MinifyOptions {
compress?: boolean | CompressOptions;
ecma?: ECMA;
enclose?: boolean | string;
ie8?: boolean;
keep_classnames?: boolean | RegExp;
keep_fnames?: boolean | RegExp;
Expand Down