91 lines (75 sloc) 2.7 KB
layout title description permalink redirect_from custom_js_with_timestamps
Using Babel
How to use Babel with your tool of choice

1 Choose your tool (try CLI)

{% for tool in %}
{% for item in tool.items %} {{item[1]}} {% endfor %}
{% endfor %}

2 Installation

{% include tools/ name="install" %}

3 Usage

{% include tools/ name="usage" %}

4 Create .babelrc configuration file

Great! You've configured Babel but you haven't made it actually do anything. Create a .babelrc config in your project root and enable some plugins.

To start, you can use the env preset, which enables transforms for ES2015+

```shell npm install babel-preset-env --save-dev ```
    In order to enable the preset you have to define it in your <code>.babelrc</code> file, like this:
```json { "presets": ["env"] } ```
    <strong>Note</strong>: Running a Babel 6.x project using npm 2.x can cause performance problems because of the way npm 2.x installs dependencies. This problem can be eliminated by either switching to npm 3.x or running npm 2.x with the <a href="">dedupe</a> flag. To check what version of npm you have run
```shell npm --version ```