Lebab transpiles your ES5 code into readable ES2015 (sugar-syntax). It does exactly the opposite of what Babel does.
- Press
F1
and selectExtensions: Install Extensions
. - Search for and select
lebab
.
See the extension installation guide for details.
Press F1
and run the command named Lebab: convert JavaScript code from ES5 to ES2015
.
- JavaScript
lebab.transforms
- Type:
Array
- Default:
['arrow', 'for-of', 'arg-spread', 'obj-method', 'obj-shorthand', 'no-strict', 'commonjs', 'exponent', 'multi-var']
All transforms are available in the official repository Lebab.
By default enabled only safe transforms:
- arrow
- for-of
- arg-spread
- obj-method
- obj-shorthand
- no-strict
- commonjs
- exponent
- multi-var
lebab.skipWarnings
- Type:
Boolean
- Default:
true
Some transforms generate warnings when they cannot be applied. This option disables these messages.
For changes keyboard shortcuts, create a new rule in File -> Preferences -> Keyboard Shortcuts
:
{
"key": "ctrl+shift+c",
"command": "lebab.convert"
}
See the Releases section of our GitHub project for changelogs for each release version.
This software is released under the terms of the MIT license.