@akhmetovdev/babel-preset

Babel preset for hipsters

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10Sep 2, 2018Aug 14, 2018Minified + gzip package size for @akhmetovdev/babel-preset in KB

Readme

@akhmetovdev/babel-preset

Babel preset for hipsters

Description

This preset requires babel 7.x

Included presets:

  • @babel/preset-env

Included plugins:

  • @babel/plugin-proposal-async-generator-functions
async function* example() {
  await 'example';
  yield 'example';
}
  • @babel/plugin-proposal-class-properties
class Example {
  example = 'example';
}
  • @babel/plugin-proposal-decorators
@example
class Example {}
  • @babel/plugin-proposal-do-expressions
const example = do {
  if (true) 'example';
};
  • @babel/plugin-proposal-export-default-from
export example from './example';
  • @babel/plugin-proposal-export-namespace-from
export * as example from './example';
  • @babel/plugin-proposal-function-bind
::example
  • @babel/plugin-proposal-function-sent
function* example() {
  console.log(function.sent);
}
  • @babel/plugin-proposal-logical-assignment-operators
a &&= b;
a ||= b;
a ??= b;
  • @babel/plugin-proposal-nullish-coalescing-operator
a = b ?? 'example';
  • @babel/plugin-proposal-numeric-separator
example = 1_000_000;
  • @babel/plugin-proposal-object-rest-spread
a = { b, c, ...d };
  • @babel/plugin-proposal-optional-catch-binding
try {
  a();
} catch {
  b();
} finally {
  c();
}
  • @babel/plugin-proposal-optional-chaining
a?.b?.c;
  • @babel/plugin-proposal-pipeline-operator
'example' |> a |> b |> c;
  • @babel/plugin-proposal-throw-expressions
function example(a = throw new Error('REQUIRED')) {}
  • @babel/plugin-proposal-unicode-property-regex
/\u{0}/u;
  • @babel/plugin-transform-runtime

Setup

Install with npm:

npm install --save-dev @akhmetovdev/babel-preset

Or install with yarn:

yarn add --dev @akhmetovdev/babel-preset

In your .babelrc:

{
  "presets": ["@akhmetovdev/babel-preset"]
}

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.