From 3ef8e61d72ed38441d21a0023fc7b5d0aa3000f3 Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Sat, 17 Dec 2016 12:41:49 +0100 Subject: [PATCH 1/2] [skip ci] update babel-core's README --- packages/babel-core/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/babel-core/README.md b/packages/babel-core/README.md index 3db09945ec..9dc2dac20c 100644 --- a/packages/babel-core/README.md +++ b/packages/babel-core/README.md @@ -9,7 +9,9 @@ import { transform } from 'babel-core'; import * as babel from 'babel-core'; ``` -## babel.transform(code: string, [options?](/docs/usage/api/#options): Object) +All transformation will use your local configuration files (.babelrc or in package.json). See [options](#options) to disable it. + +## babel.transform(code: string, [options?](#options): Object) Transforms the passed in `code`. Returning an object with the generated code, source map, and AST. @@ -27,7 +29,7 @@ result.map; result.ast; ``` -## babel.transformFile(filename: string, [options?](/docs/usage/api/#options): Object, callback: Function) +## babel.transformFile(filename: string, [options?](#options): Object, callback: Function) Asynchronously transforms the entire contents of a file. @@ -43,7 +45,7 @@ babel.transformFile("filename.js", options, function (err, result) { }); ``` -## babel.transformFileSync(filename: string, [options?](/docs/usage/api/#options): Object) +## babel.transformFileSync(filename: string, [options?](#options): Object) Synchronous version of `babel.transformFile`. Returns the transformed contents of the `filename`. @@ -58,7 +60,7 @@ babel.transformFileSync(filename, options) // => { code, map, ast } babel.transformFileSync("filename.js", options).code; ``` -## babel.transformFromAst(ast: Object, code?: string, [options?](/docs/usage/api/#options): Object) +## babel.transformFromAst(ast: Object, code?: string, [options?](#options): Object) Given, an [AST](https://astexplorer.net/), transform it. From 9d76f0b2de7b03ee8f0aea099083c80b073ae45e Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Sat, 17 Dec 2016 16:37:45 +0100 Subject: [PATCH 2/2] [skip ci] update README --- packages/babel-core/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-core/README.md b/packages/babel-core/README.md index 9dc2dac20c..eda73abf48 100644 --- a/packages/babel-core/README.md +++ b/packages/babel-core/README.md @@ -9,7 +9,7 @@ import { transform } from 'babel-core'; import * as babel from 'babel-core'; ``` -All transformation will use your local configuration files (.babelrc or in package.json). See [options](#options) to disable it. +All transformations will use your local configuration files (.babelrc or in package.json). See [options](#options) to disable it. ## babel.transform(code: string, [options?](#options): Object)