npm.io
6.24.5 • Published 4 years ago

babel-preset-dulcet

Licence
MIT
Version
6.24.5
Deps
6
Size
3 kB
Vulns
0
Weekly
0

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

.babelrc

{
  "presets": ["dulcet"]
}
Via CLI
babel script.js --presets dulcet 
Via Node API
require("babel-core").transform("code", {
  presets: ["dulcet"]
});