Linux command
lebab 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Convert ES5 to ES6
lebab [input.js] -o [output.js]
Apply specific transforms
lebab [input.js] -o [output.js] --transform arrow,let
Convert in place
lebab --replace [file.js] --transform arrow
List available transforms
lebab --help
说明
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.
参数
- -o, --out-file _file_
- Output file path.
- -t, --transform _transforms_
- Comma-separated list of transforms.
- --replace
- Modify files in place.
FAQ
What is the lebab command used for?
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.
How do I run a basic lebab example?
Run `lebab [input.js] -o [output.js]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --out-file _file_ do in lebab?
Output file path.