# babel-preset-crowdlab

> A babel preset for transforming your JavaScript for CrowdLab.

Currently based on
[`babel-preset-airbnb`](https://github.com/airbnb/babel-preset-airbnb) with some additions:

* [`babel-preset-latest`](https://babeljs.io/docs/plugins/preset-latest/)
* [`babel-plugin-transform-runtime`](https://babeljs.io/docs/plugins/transform-runtime/) for generator support

## Usage in CrowdLab UI

The easiest way to use this configuration is by copying the package boilerplate, which includes it by default. **You don't need to install it separately in CrowdLab UI projects.**

## Usage Outside of CrowdLab UI

If you want to use this Babel preset outside of the CrowdLab UI project, you can
install and use it with the following steps.

## Install

```sh
yarn add -D babel-preset-crowdlab
```

## Usage

### Via `.babelrc` (Recommended)

#### .babelrc

```json
{
  "presets": ["crowdlab"]
}
```

### Via CLI

```sh
babel script.js --presets crowdlab
```

### Via Node API

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