1.0.0 • Published 7 years ago

babel-preset-nite v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

babel-preset-nite

Babel preset for all Nite plugins.

Install

Install the CLI and this preset

npm install --save-dev babel-cli babel-preset-nite

Make a .babelrc config file with the preset

echo '{ "presets": ["nite"] }' > .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": ["nite"]
}

Via CLI

babel script.js --presets nite

Via Node API

require("babel-core").transform("code", {
  presets: ["nite"]
});