6.24.5 • Published 3 years ago
babel-preset-dulcet v6.24.5
babel-preset-dulcet
Babel preset for all Dulcet plugins.
Install
You can also check out the Dulcet Getting Started page
For more info, check out the setup page on the cli and the usage docs.
Install the CLI and this preset
npm install --save-dev babel-cli babel-preset-dulcet
Make a .babelrc config file with the preset
echo '{ "presets": ["dulcet"] }' > .babelrc
Create a file to run on
echo '<h1>Hello, world!</h1>' > index.js
View the output
./node_modules/.bin/babel index.js
Usage
Via .babelrc
(Recommended)
.babelrc
{
"presets": ["dulcet"]
}
Via CLI
babel script.js --presets dulcet
Via Node API
require("babel-core").transform("code", {
presets: ["dulcet"]
});