0.0.2 • Published 9 years ago
@swift-developer/babel-preset-swifty v0.0.2
babel-preset-swifty
Babel preset for all swifty plugins.
Install
npm install --save-dev babel-preset-swiftyUsage
Via .babelrc (Recommended)
.babelrc
{
"presets": ["swifty"]
}Via CLI
babel script.js --presets swiftyVia 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
falseto not transform modules, or one of["amd", "umd", "systemjs", "commonjs"]
- Can be
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 }]
]
}