LinuxCommandLibrary

lebab

converts JavaScript code from ES5 to ES6/ES2015+

TLDR

Convert ES5 to ES6

$ lebab [input.js] -o [output.js]
copy
Apply specific transforms
$ lebab [input.js] -o [output.js] --transform arrow,let
copy
Convert in place
$ lebab --replace [file.js] --transform arrow
copy
List available transforms
$ lebab --help
copy

SYNOPSIS

lebab [options] file

DESCRIPTION

lebab converts JavaScript code from ES5 to ES6/ES2015+. Automatically applies transformations like arrow functions, let/const, template strings, and destructuring. The reverse of Babel - modernizes legacy JavaScript code.

PARAMETERS

-o, --out-file file

Output file path.
-t, --transform transforms
Comma-separated list of transforms.
--replace
Modify files in place.

SEE ALSO

babel(1), eslint(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community