|
лет назад: 5 | |
---|---|---|
.. | ||
lib | лет назад: 5 | |
node_modules | лет назад: 5 | |
README.md | лет назад: 5 | |
index.js | лет назад: 5 | |
package.json | лет назад: 5 | |
register.js | лет назад: 5 |
Babel compiler core.
$ npm install babel-core
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/