0.1.0 • Published 7 years ago

babel-preset-swifty v0.1.0

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

babel-preset-swifty

Babel preset for all swifty plugins.

What it includes

All your favorite es2017 functionality, but with decorators thrown into the mix. You can read up on decorators here!

Made with love for the Node.js API Framework known as Swift.js

Install

npm install --save-dev babel-preset-swifty

Usage

Via .babelrc (Recommended)

.babelrc

{
  "presets": ["swifty"]
}

Via CLI

babel script.js --presets swifty

Via Node API

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

Options

  • loose - Enable "loose" transformations for any plugins in this preset that allow them (Disabled by default).
  • modules - Enable transformation of ES6 module syntax to another module type (Enabled by default to "commonjs").
    • Can be false to not transform modules, or one of ["amd", "umd", "systemjs", "commonjs"]
  • spec - Enable "spec" transformations for any plugins in this preset that allow them (Disabled by default)
{
  presets: [
    ["swifty", { "loose": true }]
  ]
}
{
  presets: [
    ["swifty", { "modules": false }]
  ]
}
{
  presets: [
    ["swifty", { "loose": true, "modules": false }]
  ]
}
{
  presets: [
    ["swifty", { "spec": true }]
  ]
}
0.1.0

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.1

7 years ago