kpdecker 94e7e4da8e Update source map handling to be reentrant
Rather than repeating the original location when we exit a node, we need to restore the previous parent’s original line location, since the source map format denotes the start location.
2015-12-18 01:11:32 -06:00
..
2015-12-17 12:49:48 -08:00
2015-12-10 17:20:27 -08:00
2015-10-29 20:15:06 -07:00

babel-core

Babel compiler core.

Install

$ npm install babel-core

Usage

import babel from 'babel-core';

const code = `class Example {}`;
const result = babel.transform(code, { /* options */ });

result.code; // Generated code
result.map; // Sourcemap
result.ast; // AST

For more in depth documentation see: http://babeljs.io/docs/usage/api/