diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a733c319e5..2270b20fa1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,7 +115,7 @@ $ TEST_ONLY=babel-cli make test `TEST_ONLY` will also match substrings of the package name: ```sh -# Run tests for the babel-plugin-transform-classes package. +# Run tests for the @babel/plugin-transform-classes package. $ TEST_ONLY=es2015-class make test ``` @@ -161,16 +161,16 @@ In case you're locally getting errors which are not on the CI, it may be due to Most packages in [`/packages`](https://github.com/babel/babel/tree/master/packages) have a `test` folder, however some tests might be in other packages or in [`/packages/babel-core`](https://github.com/babel/babel/tree/master/packages/babel-core/test/fixtures). -#### `babel-plugin-x` +#### `@babel/plugin-x` All the Babel plugins (and other packages) that have a `/test/fixtures` are written in a similar way. -For example, in [`babel-plugin-transform-exponentiation-operator/test`](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator/test): +For example, in [`@babel/plugin-transform-exponentiation-operator/test`](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator/test): - There is an `index.js` file. It imports our [test helper](https://github.com/babel/babel/tree/master/packages/babel-helper-plugin-test-runner). (You don't have to worry about this). - There can be multiple folders under [`/fixtures`](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures) - There is an [`options.json`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/options.json) file whose function is similar to a `.babelrc` file, allowing you to pass in the plugins and settings you need for your tests. - - For this test, we only need the relevant plugin, so it's just `{ "plugins": ["@babel/transform-exponentiation-operator"] }`. + - For this test, we only need the relevant plugin, so it's just `{ "plugins": ["@babel/plugin-transform-exponentiation-operator"] }`. - If necessary, you can have an `options.json` with different options in each subfolder. - In each subfolder, you can organize your directory structure by categories of tests. (Example: these folders can be named after the feature you are testing or can reference the issue number they fix) @@ -205,8 +205,8 @@ If you need to check for an error that is thrown you can add to the `options.jso ```js // options.json example { - "plugins": [["@babel/proposal-object-rest-spread", { "useBuiltIns": "invalidOption" }]], - "throws": "@babel/proposal-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)" + "plugins": [["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": "invalidOption" }]], + "throws": "@babel/plugin-proposal-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)" } ``` @@ -233,7 +233,7 @@ descriptive name, and add the following: #### Bootstrapping expected output -For both `babel-plugin-x` and `babylon`, you can easily generate an `expected.js`/`expected.json` automatically by just providing `actual.js` and running the tests as you usually would. +For both `@babel/plugin-x` and `babylon`, you can easily generate an `expected.js`/`expected.json` automatically by just providing `actual.js` and running the tests as you usually would. ``` // Example @@ -267,7 +267,7 @@ To include the changes, we have to make sure to build Babel: $ make build ``` -Next, we need to execute `Generator.generate()`, which can be achieved by running a test case in the `babel-generator` package. +Next, we need to execute `Generator.generate()`, which can be achieved by running a test case in the `@babel/generator` package. For example, we can run the test case that tests the generation of class declarations: ```bash diff --git a/codemods/babel-plugin-codemod-optional-catch-binding/README.md b/codemods/babel-plugin-codemod-optional-catch-binding/README.md index 542c7d61e1..6ba95eb9f4 100644 --- a/codemods/babel-plugin-codemod-optional-catch-binding/README.md +++ b/codemods/babel-plugin-codemod-optional-catch-binding/README.md @@ -36,21 +36,21 @@ npm install --save-dev @babel/plugin-codemod-optional-catch-binding ```json { - "plugins": ["@babel/codemod-optional-catch-binding"] + "plugins": ["@babel/plugin-codemod-optional-catch-binding"] } ``` ### Via CLI ```sh -babel --plugins @babel/codemod-optional-catch-binding script.js +babel --plugins @babel/plugin-codemod-optional-catch-binding script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/codemod-optional-catch-binding"] + plugins: ["@babel/plugin-codemod-optional-catch-binding"] }); ``` diff --git a/experimental/babel-preset-env/CHANGELOG.md b/experimental/babel-preset-env/CHANGELOG.md index f0b7b75335..c550b987f6 100644 --- a/experimental/babel-preset-env/CHANGELOG.md +++ b/experimental/babel-preset-env/CHANGELOG.md @@ -262,7 +262,7 @@ This release primarily upgrades `compat-table`, which adds support for async on - Add tests for debug output ([#156](https://github.com/babel/babel-preset-env/pull/156)) (@existentialism) -Since we've (mostly @yavorsky) have fixed a number of bugs recently with the `debug` option output, we added the ability to assert stdout matches what we expect. Read the updated [CONTRIBUTING.md](https://github.com/babel/babel-preset-env/blob/master/CONTRIBUTING.md#testing-the-debug-option) for more info. +Since we've (mostly @yavorsky) have fixed a number of bugs recently with the `debug` option output, we added the ability to assert stdout matches what we expect. Read the updated [CONTRIBUTING.md](https://github.com/babel/experimental/babel-preset-env/blob/master/CONTRIBUTING.md#testing-the-debug-option) for more info. - Fixes #143. Log correct targets. ([#155](https://github.com/babel/babel-preset-env/pull/155)) (@yavorsky) @@ -442,7 +442,7 @@ Example: `"exclude": ["map"]` doesn't include the `Map` polyfill if you know you aren't using it in your code (w/ `useBuiltIns`). (We will figure out a way to automatically do this [#84](https://github.com/babel/babel-preset-env/issues/84)). -If you pass a wrong plugin it will error: valid options for `include/exclude` are in [/data/plugin-features.js](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js) and [/data/built-in-features.js](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js) (without the `es6.`) +If you pass a wrong plugin it will error: valid options for `include/exclude` are in [/data/plugin-features.js](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugin-features.js) and [/data/built-in-features.js](https://github.com/babel/experimental/babel-preset-env/blob/master/data/built-in-features.js) (without the `es6.`) ### :house: Internal @@ -555,7 +555,7 @@ Electron is also an environment, so [Paul went ahead](https://twitter.com/paulcb } ``` -> Currently we are manually updating the data in [/data/electron-to-chromium.js](https://github.com/babel/babel-preset-env/blob/master/data/electron-to-chromium.js), but [@kevinsawicki](https://github.com/kevinsawicki) says we could generate the data from [atom-shell/dist/index.json](https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/index.json) as well! (Someone should make a PR :smile:) +> Currently we are manually updating the data in [/data/electron-to-chromium.js](https://github.com/babel/experimental/babel-preset-env/blob/master/data/electron-to-chromium.js), but [@kevinsawicki](https://github.com/kevinsawicki) says we could generate the data from [atom-shell/dist/index.json](https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/index.json) as well! (Someone should make a PR :smile:) diff --git a/experimental/babel-preset-env/CONTRIBUTING.md b/experimental/babel-preset-env/CONTRIBUTING.md index 2ca2a55c37..33fcf08bd8 100644 --- a/experimental/babel-preset-env/CONTRIBUTING.md +++ b/experimental/babel-preset-env/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Adding a new plugin to support (when approved in the next ECMAScript version) -### Update [`plugin-features.js`](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js) +### Update [`plugin-features.js`](https://github.com/babel/babel/blob/master/experimental/babel-preset-env/data/plugin-features.js) *Example:* @@ -14,20 +14,20 @@ Find the relevant entries on [compat-table](https://kangax.github.io/compat-tabl Find the corresponding babel plugin: -`transform-exponentiation-operator` +`@babel/plugin-transform-exponentiation-operator` And add them in this structure: ```js // es2016 -"@babel/transform-exponentiation-operator": { +"@babel/plugin-transform-exponentiation-operator": { features: [ "exponentiation (**) operator", ], }, ``` -### Update [`built-in-features.js`](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js) +### Update [`built-in-features.js`](https://github.com/babel/babel/blob/master/experimental/babel-preset-env/data/built-in-features.js) *Example:* @@ -42,7 +42,7 @@ Find the corresponding module on [core-js](https://github.com/zloirock/core-js/t `es7.object.values.js` -Find required ES version in [`built-in-features.js`](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js) and add the new feature: +Find required ES version in [`built-in-features.js`](https://github.com/babel/babel/blob/master/experimental/babel-preset-env/data/built-in-features.js) and add the new feature: ```js const es2017 = { @@ -51,7 +51,7 @@ const es2017 = { } ``` -### Update [`plugins.json`](https://github.com/babel/babel-preset-env/blob/master/data/plugins.json) +### Update [`plugins.json`](https://github.com/babel/babel/blob/master/experimental/babel-preset-env/data/plugins.json) Until `compat-table` is a standalone npm module for data we are using the git url @@ -77,7 +77,7 @@ npm run coverage #### General -All the tests for `babel-preset-env` exist in the `test/fixtures` folder. The +All the tests for `@babel/preset-env` exist in the `test/fixtures` folder. The test setup and conventions are exactly the same as testing a Babel plugin, so please read our [documentation on writing tests](https://github.com/babel/babel/blob/master/CONTRIBUTING.md#babel-plugin-x). diff --git a/experimental/babel-preset-env/README.md b/experimental/babel-preset-env/README.md index 3d23f6eda9..122fe009bf 100644 --- a/experimental/babel-preset-env/README.md +++ b/experimental/babel-preset-env/README.md @@ -10,7 +10,7 @@ Without any configuration options, @babel/preset-env behaves exactly the same as ```json { - "presets": ["@babel/env"] + "presets": ["@babel/preset-env"] } ``` @@ -21,7 +21,7 @@ This example only includes the polyfills and code transforms needed for the last ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "browsers": ["last 2 versions", "safari >= 7"] } @@ -30,12 +30,12 @@ This example only includes the polyfills and code transforms needed for the last } ``` -Similarly, if you're targeting Node.js instead of the browser, you can configure babel-preset-env to only include the polyfills and transforms necessary for a particular version: +Similarly, if you're targeting Node.js instead of the browser, you can configure @babel/preset-env to only include the polyfills and transforms necessary for a particular version: ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "node": "6.10" } @@ -49,7 +49,7 @@ For convenience, you can use `"node": "current"` to only include the necessary p ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "node": "current" } @@ -73,13 +73,13 @@ Use external data such as [`compat-table`](https://github.com/kangax/compat-tabl ![](https://cloud.githubusercontent.com/assets/588473/19214029/58deebce-8d48-11e6-9004-ee3fbcb75d8b.png) -We can periodically run [build-data.js](https://github.com/babel/babel-preset-env/blob/master/scripts/build-data.js) which generates [plugins.json](https://github.com/babel/babel-preset-env/blob/master/data/plugins.json). +We can periodically run [build-data.js](https://github.com/babel/experimental/babel-preset-env/blob/master/scripts/build-data.js) which generates [plugins.json](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugins.json). Ref: [#7](https://github.com/babel/babel-preset-env/issues/7) ### Maintain a mapping between JavaScript features and Babel plugins -> Currently located at [plugin-features.js](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js). +> Currently located at [plugin-features.js](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugin-features.js). This should be straightforward to do in most cases. There might be cases where plugins should be split up more or certain plugins aren't standalone enough (or impossible to do). @@ -117,7 +117,7 @@ For example, to enable only the polyfills and plugins needed for a project targe ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "useBuiltIns": "entry" }] ] @@ -167,7 +167,7 @@ The default behavior without options runs all transforms (behaves the same as [@ ```json { - "presets": ["@babel/env"] + "presets": ["@babel/preset-env"] } ``` @@ -185,7 +185,7 @@ Each target environment takes a number or a string (we recommend using a string Example environments: `chrome`, `opera`, `edge`, `firefox`, `safari`, `ie`, `ios`, `android`, `node`, `electron`. -The [data](https://github.com/babel/babel-preset-env/blob/master/data/plugins.json) for this is generated by running the [build-data script](https://github.com/babel/babel-preset-env/blob/master/scripts/build-data.js) which pulls in data from [compat-table](https://kangax.github.io/compat-table). +The [data](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugins.json) for this is generated by running the [build-data script](https://github.com/babel/experimental/babel-preset-env/blob/master/scripts/build-data.js) which pulls in data from [compat-table](https://kangax.github.io/compat-table). ### `targets.node` @@ -225,7 +225,7 @@ Setting this to `false` will not transform modules. `boolean`, defaults to `false`. -Outputs the targets/plugins used and the version specified in [plugin data version](https://github.com/babel/babel-preset-env/blob/master/data/plugins.json) to `console.log`. +Outputs the targets/plugins used and the version specified in [plugin data version](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugins.json) to `console.log`. ### `include` @@ -235,15 +235,15 @@ An array of plugins to always include. Valid options include any: -- [Babel plugins](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js), names without a prefix like `transform-spread` instead of `plugin-transform-spread` are supported. Note, that none of the module transforms (`transform-module-*`) are supported here, use the [`modules` option](https://github.com/babel/babel/tree/master/experimental/babel-preset-env#modules) instead. +- [Babel plugins](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugin-features.js) - both with (`@babel/plugin-transform-spread`) and without prefix (`plugin-transform-spread`) are supported. -- [Built-ins](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js), such as `map`, `set`, or `object.assign`. +- [Built-ins](https://github.com/babel/experimental/babel-preset-env/blob/master/data/built-in-features.js), such as `map`, `set`, or `object.assign`. This option is useful if there is a bug in a native implementation, or a combination of a non-supported feature + a supported one doesn't work. -For example, Node 4 supports native classes but not spread. If `super` is used with a spread argument, then the `transform-classes` transform needs to be `include`d, as it is not possible to transpile a spread with `super` otherwise. +For example, Node 4 supports native classes but not spread. If `super` is used with a spread argument, then the `@babel/plugin-transform-classes` transform needs to be `include`d, as it is not possible to transpile a spread with `super` otherwise. -> NOTE: The `include` and `exclude` options _only_ work with the [plugins included with this preset](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js); so, for example, including `proposal-do-expressions` or excluding `proposal-function-bind` will throw errors. To use a plugin _not_ included with this preset, add them to your [config](https://babeljs.io/docs/usage/babelrc/) directly. +> NOTE: The `include` and `exclude` options _only_ work with the [plugins included with this preset](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugin-features.js); so, for example, including `@babel/plugin-proposal-do-expressions` or excluding `@babel/plugin-proposal-function-bind` will throw errors. To use a plugin _not_ included with this preset, add them to your [config](https://babeljs.io/docs/usage/babelrc/) directly. ### `exclude` @@ -253,7 +253,7 @@ An array of plugins to always exclude/remove. The possible options are the same as the `include` option. -This option is useful for "blacklisting" a transform like `transform-regenerator` if you don't use generators and don't want to include `regeneratorRuntime` (when using `useBuiltIns`) or for using another plugin like [fast-async](https://github.com/MatAtBread/fast-async) instead of [Babel's async-to-gen](http://babeljs.io/docs/plugins/proposal-async-generator-functions/). +This option is useful for "blacklisting" a transform like `@babel/plugin-transform-regenerator` if you don't use generators and don't want to include `regeneratorRuntime` (when using `useBuiltIns`) or for using another plugin like [fast-async](https://github.com/MatAtBread/fast-async) instead of [Babel's async-to-gen](http://babeljs.io/docs/plugins/proposal-async-generator-functions/). ### `useBuiltIns` @@ -342,7 +342,7 @@ Don't add polyfills automatically per file, or transform `import "@babel/polyfil ```js module.exports = { presets: [ - ["@babel/env", { + ["@babel/preset-env", { targets: { chrome: 59, edge: 13, @@ -419,7 +419,7 @@ export class A {} ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "chrome": 52 } @@ -442,7 +442,7 @@ exports.A = A; ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "chrome": 52 }, @@ -466,7 +466,7 @@ export class A {} ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "chrome": 52, "browsers": ["last 2 versions", "safari 7"] @@ -491,7 +491,7 @@ export var A = function A() { ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "node": "current" } @@ -514,7 +514,7 @@ exports.A = A; ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "safari": 10 }, @@ -537,8 +537,8 @@ Using targets: Modules transform: false Using plugins: - transform-exponentiation-operator {} - transform-async-to-generator {} + @babel/plugin-transform-exponentiation-operator {} + @babel/plugin-transform-async-to-generator {} Using polyfills: es7.object.values {} @@ -556,12 +556,12 @@ Using polyfills: ```json { "presets": [ - ["@babel/env", { + ["@babel/preset-env", { "targets": { "browsers": ["last 2 versions", "safari >= 7"] }, - "include": ["transform-arrow-functions", "es6.map"], - "exclude": ["transform-regenerator", "es6.set"] + "include": ["@babel/plugin-transform-arrow-functions", "es6.map"], + "exclude": ["@babel/plugin-transform-regenerator", "es6.set"] }] ] } diff --git a/packages/README.md b/packages/README.md index 5efd5e9b47..07b340f2bf 100644 --- a/packages/README.md +++ b/packages/README.md @@ -45,7 +45,7 @@ Check out the [`babel-handbook`](https://github.com/thejameskyle/babel-handbook/ | [`@babel/helpers`](/packages/babel-helpers) | [![npm](https://img.shields.io/npm/v/babel-helpers.svg?maxAge=2592000)](https://www.npmjs.com/package/babel-helpers) | [![Dependency Status](https://david-dm.org/babel/babel.svg?path=packages/babel-helpers)](https://david-dm.org/babel/babel?path=packages/babel-helpers) | | [`@babel/code-frame`](/packages/babel-code-frame) | [![npm](https://img.shields.io/npm/v/babel-code-frame.svg?maxAge=2592000)](https://www.npmjs.com/package/babel-code-frame) | [![Dependency Status](https://david-dm.org/babel/babel.svg?path=packages/babel-code-frame)](https://david-dm.org/babel/babel?path=packages/babel-code-frame) | -- [`@babel/cli`](/packages/babel-cli) is the CLI tool that runs `@babel/core` and helps with outputting to a directory, a file, stdout and more (also includes `babel-node`). Check out the [docs](https://babeljs.io/docs/usage/cli/). +- [`@babel/cli`](/packages/babel-cli) is the CLI tool that runs `@babel/core` and helps with outputting to a directory, a file, stdout and more (also includes `@babel/node` cli). Check out the [docs](https://babeljs.io/docs/usage/cli/). - [`@babel/types`](/packages/babel-types) is used to validate, build and change AST nodes. - [`@babel/polyfill`](/packages/babel-polyfill) is [literally a wrapper](https://github.com/babel/babel/blob/master/packages/babel-polyfill/src/index.js) around [`core-js`](https://github.com/zloirock/core-js) and [regenerator-runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime). Check out the [docs](https://babeljs.io/docs/usage/polyfill/). - [`@babel/runtime`](/packages/babel-runtime) is similar to the polyfill except that it doesn't modify the global scope and is to be used with [`@babel/plugin-transform-runtime`](/packages/babel-plugin-transform-runtime) (usually in library/plugin code). Check out the [docs](https://babeljs.io/docs/plugins/transform-runtime/). diff --git a/packages/babel-plugin-check-constants/README.md b/packages/babel-plugin-check-constants/README.md index 777f6414d5..61c6dbf059 100644 --- a/packages/babel-plugin-check-constants/README.md +++ b/packages/babel-plugin-check-constants/README.md @@ -55,4 +55,4 @@ require("@babel/core").transform("code", { ## Note -This check will only validate consts. If you need it to compile down to `var` then you must also install and enable [`transform-block-scoping`](http://babeljs.io/docs/plugins/transform-block-scoping/). +This check will only validate consts. If you need it to compile down to `var` then you must also install and enable [`@babel/plugin-transform-block-scoping`](http://babeljs.io/docs/plugins/transform-block-scoping/). diff --git a/packages/babel-plugin-external-helpers/README.md b/packages/babel-plugin-external-helpers/README.md index fa47a22b3f..251f5e7fe8 100644 --- a/packages/babel-plugin-external-helpers/README.md +++ b/packages/babel-plugin-external-helpers/README.md @@ -14,20 +14,20 @@ npm install --save-dev @babel/plugin-external-helpers ```json { - "plugins": ["@babel/external-helpers"] + "plugins": ["@babel/plugin-external-helpers"] } ``` ### Via CLI ```sh -babel --plugins @babel/external-helpers script.js +babel --plugins @babel/plugin-external-helpers script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/external-helpers"] + plugins: ["@babel/plugin-external-helpers"] }); ``` diff --git a/packages/babel-plugin-proposal-async-generator-functions/README.md b/packages/babel-plugin-proposal-async-generator-functions/README.md index b5567b3691..543d5bfc66 100644 --- a/packages/babel-plugin-proposal-async-generator-functions/README.md +++ b/packages/babel-plugin-proposal-async-generator-functions/README.md @@ -84,21 +84,21 @@ npm install --save-dev @babel/plugin-proposal-async-generator-functions ```json { - "plugins": ["@babel/proposal-async-generator-functions"] + "plugins": ["@babel/plugin-proposal-async-generator-functions"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-async-generator-functions script.js +babel --plugins @babel/plugin-proposal-async-generator-functions script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-async-generator-functions"] + plugins: ["@babel/plugin-proposal-async-generator-functions"] }); ``` diff --git a/packages/babel-plugin-proposal-class-properties/README.md b/packages/babel-plugin-proposal-class-properties/README.md index ba0ba46e05..10d3203e87 100644 --- a/packages/babel-plugin-proposal-class-properties/README.md +++ b/packages/babel-plugin-proposal-class-properties/README.md @@ -50,7 +50,7 @@ Without options: ```json { - "plugins": ["@babel/proposal-class-properties"] + "plugins": ["@babel/plugin-proposal-class-properties"] } ``` @@ -59,7 +59,7 @@ With options: ```json { "plugins": [ - ["@babel/proposal-class-properties", { "loose": true }] + ["@babel/plugin-proposal-class-properties", { "loose": true }] ] } ``` @@ -67,14 +67,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/proposal-class-properties script.js +babel --plugins @babel/plugin-proposal-class-properties script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-class-properties"] + plugins: ["@babel/plugin-proposal-class-properties"] }); ``` diff --git a/packages/babel-plugin-proposal-decorators/README.md b/packages/babel-plugin-proposal-decorators/README.md index 2db0dd7ebf..1929d8a35f 100644 --- a/packages/babel-plugin-proposal-decorators/README.md +++ b/packages/babel-plugin-proposal-decorators/README.md @@ -58,23 +58,23 @@ Add the following line to your .babelrc file: ```json { - "plugins": ["@babel/proposal-decorators"] + "plugins": ["@babel/plugin-proposal-decorators"] } ``` #### NOTE: Order of Plugins Matters! -If you are including your plugins manually and using `proposal-class-properties`, make sure that `proposal-decorators` comes *before* `proposal-class-properties`. +If you are including your plugins manually and using `@babel/plugin-proposal-class-properties`, make sure that `@babel/plugin-proposal-decorators` comes *before* `@babel/plugin-proposal-class-properties`. -Currently, `proposal-class-properties` must be used in `loose` mode to support the `proposal-decorators`. To use `proposal-class-properties` in spec mode with decorators, wait for the next major version of decorators (Stage 2). +Currently, `@babel/plugin-proposal-class-properties` must be used in `loose` mode to support the `@babel/plugin-proposal-decorators`. To use `@babel/plugin-proposal-class-properties` in spec mode with decorators, wait for the next major version of decorators (Stage 2). Wrong: ```json { "plugins": [ - "@babel/proposal-class-properties", - "@babel/proposal-decorators" + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-decorators" ] } ``` @@ -84,8 +84,8 @@ Right: ```json { "plugins": [ - "@babel/proposal-decorators", - ["@babel/proposal-class-properties", { "loose" : true }] + "@babel/plugin-proposal-decorators", + ["@babel/plugin-proposal-class-properties", { "loose" : true }] ] } ``` @@ -93,14 +93,14 @@ Right: ### Via CLI ```sh -babel --plugins @babel/proposal-decorators script.js +babel --plugins @babel/plugin-proposal-decorators script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-decorators"] + plugins: ["@babel/plugin-proposal-decorators"] }); ``` diff --git a/packages/babel-plugin-proposal-do-expressions/README.md b/packages/babel-plugin-proposal-do-expressions/README.md index f0c7e1d401..cc5c3aabc8 100644 --- a/packages/babel-plugin-proposal-do-expressions/README.md +++ b/packages/babel-plugin-proposal-do-expressions/README.md @@ -94,21 +94,21 @@ npm install --save-dev @babel/plugin-proposal-do-expressions ```json { - "plugins": ["@babel/proposal-do-expressions"] + "plugins": ["@babel/plugin-proposal-do-expressions"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-do-expressions script.js +babel --plugins @babel/plugin-proposal-do-expressions script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-do-expressions"] + plugins: ["@babel/plugin-proposal-do-expressions"] }); ``` diff --git a/packages/babel-plugin-proposal-export-default/README.md b/packages/babel-plugin-proposal-export-default/README.md index fe1feee0ca..22bc79a778 100644 --- a/packages/babel-plugin-proposal-export-default/README.md +++ b/packages/babel-plugin-proposal-export-default/README.md @@ -22,21 +22,21 @@ npm install --save-dev @babel/plugin-proposal-export-default ```json { - "plugins": ["@babel/proposal-export-default"] + "plugins": ["@babel/plugin-proposal-export-default"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-export-default script.js +babel --plugins @babel/plugin-proposal-export-default script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-export-default"] + plugins: ["@babel/plugin-proposal-export-default"] }); ``` ## References diff --git a/packages/babel-plugin-proposal-export-namespace/README.md b/packages/babel-plugin-proposal-export-namespace/README.md index 9d6206d67f..83f60d7752 100644 --- a/packages/babel-plugin-proposal-export-namespace/README.md +++ b/packages/babel-plugin-proposal-export-namespace/README.md @@ -22,21 +22,21 @@ npm install --save-dev @babel/plugin-proposal-export-namespace ```json { - "plugins": ["@babel/proposal-export-namespace"] + "plugins": ["@babel/plugin-proposal-export-namespace"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-export-namespace script.js +babel --plugins @babel/plugin-proposal-export-namespace script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-export-namespace"] + plugins: ["@babel/plugin-proposal-export-namespace"] }); ``` ## References diff --git a/packages/babel-plugin-proposal-function-bind/README.md b/packages/babel-plugin-proposal-function-bind/README.md index 1347ab6c62..15552e68f6 100644 --- a/packages/babel-plugin-proposal-function-bind/README.md +++ b/packages/babel-plugin-proposal-function-bind/README.md @@ -97,21 +97,21 @@ npm install --save-dev @babel/plugin-proposal-function-bind ```json { - "plugins": ["@babel/proposal-function-bind"] + "plugins": ["@babel/plugin-proposal-function-bind"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-function-bind script.js +babel --plugins @babel/plugin-proposal-function-bind script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-function-bind"] + plugins: ["@babel/plugin-proposal-function-bind"] }); ``` diff --git a/packages/babel-plugin-proposal-function-sent/README.md b/packages/babel-plugin-proposal-function-sent/README.md index 6dc90aa1c3..9c4984919d 100644 --- a/packages/babel-plugin-proposal-function-sent/README.md +++ b/packages/babel-plugin-proposal-function-sent/README.md @@ -43,21 +43,21 @@ npm install --save-dev @babel/plugin-proposal-function-sent ```json { - "plugins": ["@babel/proposal-function-sent"] + "plugins": ["@babel/plugin-proposal-function-sent"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-function-sent script.js +babel --plugins @babel/plugin-proposal-function-sent script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-function-sent"] + plugins: ["@babel/plugin-proposal-function-sent"] }); ``` diff --git a/packages/babel-plugin-proposal-nullish-coalescing-operator/README.md b/packages/babel-plugin-proposal-nullish-coalescing-operator/README.md index 5f21616ca5..d433354f26 100644 --- a/packages/babel-plugin-proposal-nullish-coalescing-operator/README.md +++ b/packages/babel-plugin-proposal-nullish-coalescing-operator/README.md @@ -35,21 +35,21 @@ npm install --save-dev @babel/plugin-proposal-nullish-coalescing-operator ```json { - "plugins": ["@babel/proposal-nullish-coalescing-operator"] + "plugins": ["@babel/plugin-proposal-nullish-coalescing-operator"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-nullish-coalescing-operator script.js +babel --plugins @babel/plugin-proposal-nullish-coalescing-operator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-nullish-coalescing-operator"] + plugins: ["@babel/plugin-proposal-nullish-coalescing-operator"] }); ``` diff --git a/packages/babel-plugin-proposal-numeric-separator/README.md b/packages/babel-plugin-proposal-numeric-separator/README.md index 5963385532..2a7e48a263 100644 --- a/packages/babel-plugin-proposal-numeric-separator/README.md +++ b/packages/babel-plugin-proposal-numeric-separator/README.md @@ -71,29 +71,29 @@ npm install --save-dev @babel/plugin-proposal-numeric-separator ```json { - "plugins": ["@babel/proposal-numeric-separator"] + "plugins": ["@babel/plugin-proposal-numeric-separator"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-numeric-separator script.js +babel --plugins @babel/plugin-proposal-numeric-separator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-numeric-separator"] + plugins: ["@babel/plugin-proposal-numeric-separator"] }); ``` ## Additional Information -If you need to further compile ES2015 Decimal, Binary, Hex and Octal number representations to their pre-ES2015 numeric literal form, add the [`"@babel/transform-literals"`](http://babeljs.io/docs/plugins/transform-literals/) plugin: +If you need to further compile ES2015 Decimal, Binary, Hex and Octal number representations to their pre-ES2015 numeric literal form, add the [`"@babel/plugin-transform-literals"`](http://babeljs.io/docs/plugins/transform-literals/) plugin: -> `transform-literals` is already included in [@babel/preset-env](https://github.com/babel/babel/tree/master/experimental/babel-preset-env) and @babel/preset-es2015. +> `@babel/plugin-transform-literals` is already included in [@babel/preset-env](https://github.com/babel/babel/tree/master/experimental/babel-preset-env) and @babel/preset-es2015. ### Via `.babelrc` (Recommended) @@ -101,11 +101,11 @@ If you need to further compile ES2015 Decimal, Binary, Hex and Octal number repr ```json { - "presets": ["@babel/env"], - "plugins": ["@babel/proposal-numeric-separator"] + "presets": ["@babel/preset-env"], + "plugins": ["@babel/plugin-proposal-numeric-separator"] } { - "plugins": ["@babel/proposal-numeric-separator", "@babel/transform-literals"] + "plugins": ["@babel/plugin-proposal-numeric-separator", "@babel/plugin-transform-literals"] } ``` diff --git a/packages/babel-plugin-proposal-object-rest-spread/README.md b/packages/babel-plugin-proposal-object-rest-spread/README.md index 55375ab54a..f5beaa4df9 100644 --- a/packages/babel-plugin-proposal-object-rest-spread/README.md +++ b/packages/babel-plugin-proposal-object-rest-spread/README.md @@ -34,21 +34,21 @@ npm install --save-dev @babel/plugin-proposal-object-rest-spread ```json { - "plugins": ["@babel/proposal-object-rest-spread"] + "plugins": ["@babel/plugin-proposal-object-rest-spread"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-object-rest-spread script.js +babel --plugins @babel/plugin-proposal-object-rest-spread script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-object-rest-spread"] + plugins: ["@babel/plugin-proposal-object-rest-spread"] }); ``` @@ -65,7 +65,7 @@ By default, this plugin uses Babel's `extends` helper which polyfills `Object.as ```json { "plugins": [ - ["@babel/proposal-object-rest-spread", { "useBuiltIns": true }] + ["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }] ] } ``` diff --git a/packages/babel-plugin-proposal-optional-catch-binding/README.md b/packages/babel-plugin-proposal-optional-catch-binding/README.md index 1677ea4f7b..e06eb65d4d 100644 --- a/packages/babel-plugin-proposal-optional-catch-binding/README.md +++ b/packages/babel-plugin-proposal-optional-catch-binding/README.md @@ -38,21 +38,21 @@ npm install --save-dev @babel/plugin-proposal-optional-catch-binding ```json { - "plugins": ["@babel/proposal-optional-catch-binding"] + "plugins": ["@babel/plugin-proposal-optional-catch-binding"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-optional-catch-binding script.js +babel --plugins @babel/plugin-proposal-optional-catch-binding script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-optional-catch-binding"] + plugins: ["@babel/plugin-proposal-optional-catch-binding"] }); ``` diff --git a/packages/babel-plugin-proposal-optional-chaining/README.md b/packages/babel-plugin-proposal-optional-chaining/README.md index 453db2b66d..b3338262c7 100644 --- a/packages/babel-plugin-proposal-optional-chaining/README.md +++ b/packages/babel-plugin-proposal-optional-chaining/README.md @@ -95,21 +95,21 @@ npm install --save-dev @babel/plugin-proposal-optional-chaining ```json { - "plugins": ["@babel/proposal-optional-chaining"] + "plugins": ["@babel/plugin-proposal-optional-chaining"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-optional-chaining script.js +babel --plugins @babel/plugin-proposal-optional-chaining script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-optional-chaining"] + plugins: ["@babel/plugin-proposal-optional-chaining"] }); ``` diff --git a/packages/babel-plugin-proposal-pipeline-operator/README.md b/packages/babel-plugin-proposal-pipeline-operator/README.md index 5d27cd63b3..9295d099ee 100644 --- a/packages/babel-plugin-proposal-pipeline-operator/README.md +++ b/packages/babel-plugin-proposal-pipeline-operator/README.md @@ -16,20 +16,20 @@ $ npm install @babel/plugin-proposal-pipeline-operator ```json { - "plugins": ["@babel/proposal-pipeline-operator"] + "plugins": ["@babel/plugin-proposal-pipeline-operator"] } ``` ### Via CLI ```sh -$ babel --plugins @babel/proposal-pipeline-operator script.js +$ babel --plugins @babel/plugin-proposal-pipeline-operator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-pipeline-operator"] + plugins: ["@babel/plugin-proposal-pipeline-operator"] }); ``` diff --git a/packages/babel-plugin-proposal-throw-expressions/README.md b/packages/babel-plugin-proposal-throw-expressions/README.md index 4ae8a29f88..ee7756895e 100644 --- a/packages/babel-plugin-proposal-throw-expressions/README.md +++ b/packages/babel-plugin-proposal-throw-expressions/README.md @@ -24,21 +24,21 @@ npm install --save-dev @babel/plugin-proposal-throw-expressions ```json { - "plugins": ["@babel/proposal-throw-expressions"] + "plugins": ["@babel/plugin-proposal-throw-expressions"] } ``` ### Via CLI ```sh -babel --plugins @babel/proposal-throw-expressions script.js +babel --plugins @babel/plugin-proposal-throw-expressions script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/proposal-throw-expressions"] + plugins: ["@babel/plugin-proposal-throw-expressions"] }); ``` diff --git a/packages/babel-plugin-proposal-unicode-property-regex/README.md b/packages/babel-plugin-proposal-unicode-property-regex/README.md index 1a632450ec..27e25df8e3 100644 --- a/packages/babel-plugin-proposal-unicode-property-regex/README.md +++ b/packages/babel-plugin-proposal-unicode-property-regex/README.md @@ -20,21 +20,21 @@ npm install @babel/plugin-proposal-unicode-property-regex ```json { - "plugins": ["@babel/proposal-unicode-property-regex"] + "plugins": ["@babel/plugin-proposal-unicode-property-regex"] } ``` ### Via CLI ```sh -babel --plugins @babel/@babel/proposal-unicode-property-regex script.js +babel --plugins @babel/@babel/plugin-proposal-unicode-property-regex script.js ``` ### Via Node.js API ```js require("@babel/core").transform(code, { - "plugins": ["@babel/proposal-unicode-property-regex"] + "plugins": ["@babel/plugin-proposal-unicode-property-regex"] }); ``` @@ -43,7 +43,7 @@ To transpile to ES6/ES2015: ```js require("@babel/core").transform(code, { "plugins": [ - ["@babel/proposal-unicode-property-regex", { "useUnicodeFlag": false }] + ["@babel/plugin-proposal-unicode-property-regex", { "useUnicodeFlag": false }] ] }); ``` diff --git a/packages/babel-plugin-syntax-async-generators/README.md b/packages/babel-plugin-syntax-async-generators/README.md index e1cc71240e..b8f9e7cdbb 100644 --- a/packages/babel-plugin-syntax-async-generators/README.md +++ b/packages/babel-plugin-syntax-async-generators/README.md @@ -34,21 +34,21 @@ npm install --save-dev @babel/plugin-syntax-async-generators ```json { - "plugins": ["@babel/syntax-async-generators"] + "plugins": ["@babel/plugin-syntax-async-generators"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-async-generators script.js +babel --plugins @babel/plugin-syntax-async-generators script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-async-generators"] + plugins: ["@babel/plugin-syntax-async-generators"] }); ``` diff --git a/packages/babel-plugin-syntax-class-properties/README.md b/packages/babel-plugin-syntax-class-properties/README.md index d6b18c8156..fddd0b4d7a 100644 --- a/packages/babel-plugin-syntax-class-properties/README.md +++ b/packages/babel-plugin-syntax-class-properties/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-class-properties ```json { - "plugins": ["@babel/syntax-class-properties"] + "plugins": ["@babel/plugin-syntax-class-properties"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-class-properties script.js +babel --plugins @babel/plugin-syntax-class-properties script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-class-properties"] + plugins: ["@babel/plugin-syntax-class-properties"] }); ``` diff --git a/packages/babel-plugin-syntax-decorators/README.md b/packages/babel-plugin-syntax-decorators/README.md index a0b5599d45..adca25dcd3 100644 --- a/packages/babel-plugin-syntax-decorators/README.md +++ b/packages/babel-plugin-syntax-decorators/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-decorators ```json { - "plugins": ["@babel/syntax-decorators"] + "plugins": ["@babel/plugin-syntax-decorators"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-decorators script.js +babel --plugins @babel/plugin-syntax-decorators script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-decorators"] + plugins: ["@babel/plugin-syntax-decorators"] }); ``` diff --git a/packages/babel-plugin-syntax-do-expressions/README.md b/packages/babel-plugin-syntax-do-expressions/README.md index 669421beb5..36689ddd53 100644 --- a/packages/babel-plugin-syntax-do-expressions/README.md +++ b/packages/babel-plugin-syntax-do-expressions/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-do-expressions ```json { - "plugins": ["@babel/syntax-do-expressions"] + "plugins": ["@babel/plugin-syntax-do-expressions"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-do-expressions script.js +babel --plugins @babel/plugin-syntax-do-expressions script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-do-expressions"] + plugins: ["@babel/plugin-syntax-do-expressions"] }); ``` diff --git a/packages/babel-plugin-syntax-dynamic-import/README.md b/packages/babel-plugin-syntax-dynamic-import/README.md index 2754e8a366..4705c75ec5 100644 --- a/packages/babel-plugin-syntax-dynamic-import/README.md +++ b/packages/babel-plugin-syntax-dynamic-import/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-dynamic-import ```json { - "plugins": ["@babel/syntax-dynamic-import"] + "plugins": ["@babel/plugin-syntax-dynamic-import"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-dynamic-import script.js +babel --plugins @babel/plugin-syntax-dynamic-import script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-dynamic-import"] + plugins: ["@babel/plugin-syntax-dynamic-import"] }); ``` diff --git a/packages/babel-plugin-syntax-export-extensions/README.md b/packages/babel-plugin-syntax-export-extensions/README.md index 06ef19b4e9..ecf746327f 100644 --- a/packages/babel-plugin-syntax-export-extensions/README.md +++ b/packages/babel-plugin-syntax-export-extensions/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-export-extensions ```json { - "plugins": ["@babel/syntax-export-extensions"] + "plugins": ["@babel/plugin-syntax-export-extensions"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-export-extensions script.js +babel --plugins @babel/plugin-syntax-export-extensions script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-export-extensions"] + plugins: ["@babel/plugin-syntax-export-extensions"] }); ``` diff --git a/packages/babel-plugin-syntax-flow/README.md b/packages/babel-plugin-syntax-flow/README.md index 8ab7055d14..bcb5b7404d 100644 --- a/packages/babel-plugin-syntax-flow/README.md +++ b/packages/babel-plugin-syntax-flow/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-flow ```json { - "plugins": ["@babel/syntax-flow"] + "plugins": ["@babel/plugin-syntax-flow"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-flow script.js +babel --plugins @babel/plugin-syntax-flow script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-flow"] + plugins: ["@babel/plugin-syntax-flow"] }); ``` diff --git a/packages/babel-plugin-syntax-function-bind/README.md b/packages/babel-plugin-syntax-function-bind/README.md index 1c0704d271..a90f394f54 100644 --- a/packages/babel-plugin-syntax-function-bind/README.md +++ b/packages/babel-plugin-syntax-function-bind/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-function-bind ```json { - "plugins": ["@babel/syntax-function-bind"] + "plugins": ["@babel/plugin-syntax-function-bind"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-function-bind script.js +babel --plugins @babel/plugin-syntax-function-bind script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-function-bind"] + plugins: ["@babel/plugin-syntax-function-bind"] }); ``` diff --git a/packages/babel-plugin-syntax-function-sent/README.md b/packages/babel-plugin-syntax-function-sent/README.md index 6fdb0ee22a..e8aa25401d 100644 --- a/packages/babel-plugin-syntax-function-sent/README.md +++ b/packages/babel-plugin-syntax-function-sent/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-function-sent ```json { - "plugins": ["@babel/syntax-function-sent"] + "plugins": ["@babel/plugin-syntax-function-sent"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-function-sent script.js +babel --plugins @babel/plugin-syntax-function-sent script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-function-sent"] + plugins: ["@babel/plugin-syntax-function-sent"] }); ``` diff --git a/packages/babel-plugin-syntax-jsx/README.md b/packages/babel-plugin-syntax-jsx/README.md index 9962e4aefc..41096c527f 100644 --- a/packages/babel-plugin-syntax-jsx/README.md +++ b/packages/babel-plugin-syntax-jsx/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-jsx ```json { - "plugins": ["@babel/syntax-jsx"] + "plugins": ["@babel/plugin-syntax-jsx"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-jsx script.js +babel --plugins @babel/plugin-syntax-jsx script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-jsx"] + plugins: ["@babel/plugin-syntax-jsx"] }); ``` diff --git a/packages/babel-plugin-syntax-nullish-coalescing-operator/README.md b/packages/babel-plugin-syntax-nullish-coalescing-operator/README.md index 1895df7f8d..9e8bf04769 100644 --- a/packages/babel-plugin-syntax-nullish-coalescing-operator/README.md +++ b/packages/babel-plugin-syntax-nullish-coalescing-operator/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-nullish-coalescing-operator ```json { - "plugins": ["@babel/syntax-nullish-coalescing-operator"] + "plugins": ["@babel/plugin-syntax-nullish-coalescing-operator"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-nullish-coalescing-operator script.js +babel --plugins @babel/plugin-syntax-nullish-coalescing-operator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-nullish-coalescing-operator"] + plugins: ["@babel/plugin-syntax-nullish-coalescing-operator"] }); ``` diff --git a/packages/babel-plugin-syntax-numeric-separator/README.md b/packages/babel-plugin-syntax-numeric-separator/README.md index 4f2f216a69..3976234f96 100644 --- a/packages/babel-plugin-syntax-numeric-separator/README.md +++ b/packages/babel-plugin-syntax-numeric-separator/README.md @@ -17,20 +17,20 @@ npm install --save-dev @babel/plugin-syntax-numeric-separator ```json { - "plugins": ["@babel/syntax-numeric-separator"] + "plugins": ["@babel/plugin-syntax-numeric-separator"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-numeric-separator script.js +babel --plugins @babel/plugin-syntax-numeric-separator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-numeric-separator"] + plugins: ["@babel/plugin-syntax-numeric-separator"] }); ``` diff --git a/packages/babel-plugin-syntax-object-rest-spread/README.md b/packages/babel-plugin-syntax-object-rest-spread/README.md index d9ac873ced..1633833f50 100644 --- a/packages/babel-plugin-syntax-object-rest-spread/README.md +++ b/packages/babel-plugin-syntax-object-rest-spread/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-object-rest-spread ```json { - "plugins": ["@babel/syntax-object-rest-spread"] + "plugins": ["@babel/plugin-syntax-object-rest-spread"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-object-rest-spread script.js +babel --plugins @babel/plugin-syntax-object-rest-spread script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-object-rest-spread"] + plugins: ["@babel/plugin-syntax-object-rest-spread"] }); ``` diff --git a/packages/babel-plugin-syntax-optional-catch-binding/README.md b/packages/babel-plugin-syntax-optional-catch-binding/README.md index e50070ce9a..3d4fd8f303 100644 --- a/packages/babel-plugin-syntax-optional-catch-binding/README.md +++ b/packages/babel-plugin-syntax-optional-catch-binding/README.md @@ -29,21 +29,21 @@ npm install --save-dev @babel/plugin-syntax-optional-catch-binding ```json { - "plugins": ["@babel/syntax-optional-catch-binding"] + "plugins": ["@babel/plugin-syntax-optional-catch-binding"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-optional-catch-binding script.js +babel --plugins @babel/plugin-syntax-optional-catch-binding script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-optional-catch-binding"] + plugins: ["@babel/plugin-syntax-optional-catch-binding"] }); ``` diff --git a/packages/babel-plugin-syntax-optional-chaining/README.md b/packages/babel-plugin-syntax-optional-chaining/README.md index 5ac600cdd9..0e571d750b 100644 --- a/packages/babel-plugin-syntax-optional-chaining/README.md +++ b/packages/babel-plugin-syntax-optional-chaining/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/plugin-syntax-optional-chaining ```json { - "plugins": ["@babel/syntax-optional-chaining"] + "plugins": ["@babel/plugin-syntax-optional-chaining"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-optional-chaining script.js +babel --plugins @babel/plugin-syntax-optional-chaining script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-optional-chaining"] + plugins: ["@babel/plugin-syntax-optional-chaining"] }); ``` diff --git a/packages/babel-plugin-syntax-pipeline-operator/README.md b/packages/babel-plugin-syntax-pipeline-operator/README.md index bffb566859..2bdd5b929b 100644 --- a/packages/babel-plugin-syntax-pipeline-operator/README.md +++ b/packages/babel-plugin-syntax-pipeline-operator/README.md @@ -16,20 +16,20 @@ $ npm install @babel/plugin-syntax-pipeline-operator ```json { - "plugins": ["@babel/syntax-pipeline-operator"] + "plugins": ["@babel/plugin-syntax-pipeline-operator"] } ``` ### Via CLI ```sh -$ babel --plugins @babel/syntax-pipeline-operator script.js +$ babel --plugins @babel/plugin-syntax-pipeline-operator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-pipeline-operator"] + plugins: ["@babel/plugin-syntax-pipeline-operator"] }); ``` diff --git a/packages/babel-plugin-syntax-throw-expressions/README.md b/packages/babel-plugin-syntax-throw-expressions/README.md index b457cc94a5..9aa7f87807 100644 --- a/packages/babel-plugin-syntax-throw-expressions/README.md +++ b/packages/babel-plugin-syntax-throw-expressions/README.md @@ -23,20 +23,20 @@ npm install --save-dev @babel/plugin-syntax-throw-expressions ```json { - "plugins": ["@babel/syntax-throw-expressions"] + "plugins": ["@babel/plugin-syntax-throw-expressions"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-throw-expressions script.js +babel --plugins @babel/plugin-syntax-throw-expressions script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-throw-expressions"] + plugins: ["@babel/plugin-syntax-throw-expressions"] }); ``` diff --git a/packages/babel-plugin-syntax-typescript/README.md b/packages/babel-plugin-syntax-typescript/README.md index e6b65ffe45..e24f1b6cfe 100644 --- a/packages/babel-plugin-syntax-typescript/README.md +++ b/packages/babel-plugin-syntax-typescript/README.md @@ -14,20 +14,20 @@ npm install --save-dev @babel/plugin-syntax-typescript ```json { - "plugins": ["@babel/syntax-typescript"] + "plugins": ["@babel/plugin-syntax-typescript"] } ``` ### Via CLI ```sh -babel --plugins @babel/syntax-typescript script.js +babel --plugins @babel/plugin-syntax-typescript script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/syntax-typescript"] + plugins: ["@babel/plugin-syntax-typescript"] }); ``` diff --git a/packages/babel-plugin-transform-arrow-functions/README.md b/packages/babel-plugin-transform-arrow-functions/README.md index a50acfb22e..3cccc15aec 100644 --- a/packages/babel-plugin-transform-arrow-functions/README.md +++ b/packages/babel-plugin-transform-arrow-functions/README.md @@ -67,7 +67,7 @@ Without options: ```json { - "plugins": ["@babel/transform-arrow-functions"] + "plugins": ["@babel/plugin-transform-arrow-functions"] } ``` @@ -76,7 +76,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-arrow-functions", { "spec": true }] + ["@babel/plugin-transform-arrow-functions", { "spec": true }] ] } ``` @@ -84,14 +84,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-arrow-functions script.js +babel --plugins @babel/plugin-transform-arrow-functions script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-arrow-functions"] + plugins: ["@babel/plugin-transform-arrow-functions"] }); ``` diff --git a/packages/babel-plugin-transform-async-to-generator/README.md b/packages/babel-plugin-transform-async-to-generator/README.md index b7942732d2..8065bc8e3d 100644 --- a/packages/babel-plugin-transform-async-to-generator/README.md +++ b/packages/babel-plugin-transform-async-to-generator/README.md @@ -53,7 +53,7 @@ Without options: ```json { - "plugins": ["@babel/transform-async-to-generator"] + "plugins": ["@babel/plugin-transform-async-to-generator"] } ``` @@ -62,7 +62,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-async-to-generator", { + ["@babel/plugin-transform-async-to-generator", { "module": "bluebird", "method": "coroutine" }] @@ -73,14 +73,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-async-to-generator script.js +babel --plugins @babel/plugin-transform-async-to-generator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-async-to-generator"] + plugins: ["@babel/plugin-transform-async-to-generator"] }); ``` diff --git a/packages/babel-plugin-transform-block-scoped-functions/README.md b/packages/babel-plugin-transform-block-scoped-functions/README.md index bc345fe40d..835d7424bb 100644 --- a/packages/babel-plugin-transform-block-scoped-functions/README.md +++ b/packages/babel-plugin-transform-block-scoped-functions/README.md @@ -42,20 +42,20 @@ npm install --save-dev @babel/plugin-transform-block-scoped-functions ```json { - "plugins": ["@babel/transform-block-scoped-functions"] + "plugins": ["@babel/plugin-transform-block-scoped-functions"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-block-scoped-functions script.js +babel --plugins @babel/plugin-transform-block-scoped-functions script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-block-scoped-functions"] + plugins: ["@babel/plugin-transform-block-scoped-functions"] }); ``` diff --git a/packages/babel-plugin-transform-block-scoping/README.md b/packages/babel-plugin-transform-block-scoping/README.md index 02d44342bd..75cd06e402 100644 --- a/packages/babel-plugin-transform-block-scoping/README.md +++ b/packages/babel-plugin-transform-block-scoping/README.md @@ -40,7 +40,7 @@ Without options: ```json { - "plugins": ["@babel/transform-block-scoping"] + "plugins": ["@babel/plugin-transform-block-scoping"] } ``` @@ -49,7 +49,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-block-scoping", { + ["@babel/plugin-transform-block-scoping", { "throwIfClosureRequired": true }] ] @@ -59,14 +59,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-block-scoping script.js +babel --plugins @babel/plugin-transform-block-scoping script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-block-scoping"] + plugins: ["@babel/plugin-transform-block-scoping"] }); ``` diff --git a/packages/babel-plugin-transform-classes/README.md b/packages/babel-plugin-transform-classes/README.md index 9bd3436c14..2da2fb76a9 100644 --- a/packages/babel-plugin-transform-classes/README.md +++ b/packages/babel-plugin-transform-classes/README.md @@ -6,7 +6,7 @@ Built-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed due to limitations in ES5 (for the [classes](http://babeljs.io/docs/plugins/transform-classes) plugin). -You can try to use [babel-plugin-transform-builtin-extend](https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend) based on `Object.setPrototypeOf` and `Reflect.construct`, but it also has some limitations. +You can try to use [@babel/plugin-transform-builtin-extend](https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend) based on `Object.setPrototypeOf` and `Reflect.construct`, but it also has some limitations. ## Examples @@ -59,13 +59,13 @@ npm install --save-dev @babel/plugin-transform-classes ```js // without options { - "plugins": ["@babel/transform-classes"] + "plugins": ["@babel/plugin-transform-classes"] } // with options { "plugins": [ - ["@babel/transform-classes", { + ["@babel/plugin-transform-classes", { "loose": true }] ] @@ -75,14 +75,14 @@ npm install --save-dev @babel/plugin-transform-classes ### Via CLI ```sh -babel --plugins @babel/transform-classes script.js +babel --plugins @babel/plugin-transform-classes script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-classes"] + plugins: ["@babel/plugin-transform-classes"] }); ``` diff --git a/packages/babel-plugin-transform-computed-properties/README.md b/packages/babel-plugin-transform-computed-properties/README.md index d1fa668e35..0a420ba051 100644 --- a/packages/babel-plugin-transform-computed-properties/README.md +++ b/packages/babel-plugin-transform-computed-properties/README.md @@ -61,7 +61,7 @@ Without options: ```json { - "plugins": ["@babel/transform-computed-properties"] + "plugins": ["@babel/plugin-transform-computed-properties"] } ``` @@ -70,7 +70,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-computed-properties", { + ["@babel/plugin-transform-computed-properties", { "loose": true }] ] @@ -80,14 +80,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-computed-properties script.js +babel --plugins @babel/plugin-transform-computed-properties script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-computed-properties"] + plugins: ["@babel/plugin-transform-computed-properties"] }); ``` diff --git a/packages/babel-plugin-transform-destructuring/README.md b/packages/babel-plugin-transform-destructuring/README.md index a282743cca..93c9fcdf0c 100644 --- a/packages/babel-plugin-transform-destructuring/README.md +++ b/packages/babel-plugin-transform-destructuring/README.md @@ -34,20 +34,20 @@ npm install --save-dev @babel/plugin-transform-destructuring ```json { - "plugins": ["@babel/transform-destructuring"] + "plugins": ["@babel/plugin-transform-destructuring"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-destructuring script.js +babel --plugins @babel/plugin-transform-destructuring script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-destructuring"] + plugins: ["@babel/plugin-transform-destructuring"] }); ``` diff --git a/packages/babel-plugin-transform-duplicate-keys/README.md b/packages/babel-plugin-transform-duplicate-keys/README.md index 8c199e5b8a..a64bac733e 100644 --- a/packages/babel-plugin-transform-duplicate-keys/README.md +++ b/packages/babel-plugin-transform-duplicate-keys/README.md @@ -2,7 +2,7 @@ > Compile objects with duplicate keys to valid strict ES5. -This plugin actually converts duplicate keys in objects to be computed properties, which then must be handled by the [transform-computed-properties](http://babeljs.io/docs/plugins/transform-computed-properties) plugin. The final result won't contain any object literals with duplicate keys. +This plugin actually converts duplicate keys in objects to be computed properties, which then must be handled by the [@babel/plugin-transform-computed-properties](http://babeljs.io/docs/plugins/transform-computed-properties) plugin. The final result won't contain any object literals with duplicate keys. ## Example @@ -42,20 +42,20 @@ npm install --save-dev @babel/plugin-transform-duplicate-keys ```json { - "plugins": ["@babel/transform-duplicate-keys"] + "plugins": ["@babel/plugin-transform-duplicate-keys"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-duplicate-keys script.js +babel --plugins @babel/plugin-transform-duplicate-keys script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-duplicate-keys"] + plugins: ["@babel/plugin-transform-duplicate-keys"] }); ``` diff --git a/packages/babel-plugin-transform-eval/README.md b/packages/babel-plugin-transform-eval/README.md index a151295ddd..a88e53778f 100644 --- a/packages/babel-plugin-transform-eval/README.md +++ b/packages/babel-plugin-transform-eval/README.md @@ -30,20 +30,20 @@ npm install --save-dev @babel/plugin-transform-eval ```json { - "plugins": ["@babel/transform-eval"] + "plugins": ["@babel/plugin-transform-eval"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-eval script.js +babel --plugins @babel/plugin-transform-eval script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-eval"] + plugins: ["@babel/plugin-transform-eval"] }); ``` diff --git a/packages/babel-plugin-transform-exponentiation-operator/README.md b/packages/babel-plugin-transform-exponentiation-operator/README.md index a52b04cb8a..57401fc5d4 100644 --- a/packages/babel-plugin-transform-exponentiation-operator/README.md +++ b/packages/babel-plugin-transform-exponentiation-operator/README.md @@ -39,21 +39,21 @@ npm install --save-dev @babel/plugin-transform-exponentiation-operator ```json { - "plugins": ["@babel/transform-exponentiation-operator"] + "plugins": ["@babel/plugin-transform-exponentiation-operator"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-exponentiation-operator script.js +babel --plugins @babel/plugin-transform-exponentiation-operator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-exponentiation-operator"] + plugins: ["@babel/plugin-transform-exponentiation-operator"] }); ``` diff --git a/packages/babel-plugin-transform-flow-comments/README.md b/packages/babel-plugin-transform-flow-comments/README.md index da6f191d4e..df969692ac 100644 --- a/packages/babel-plugin-transform-flow-comments/README.md +++ b/packages/babel-plugin-transform-flow-comments/README.md @@ -52,20 +52,20 @@ npm install --save-dev @babel/plugin-transform-flow-comments ```json { - "plugins": ["@babel/transform-flow-comments"] + "plugins": ["@babel/plugin-transform-flow-comments"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-flow-comments script.js +babel --plugins @babel/plugin-transform-flow-comments script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-flow-comments"] + plugins: ["@babel/plugin-transform-flow-comments"] }); ``` diff --git a/packages/babel-plugin-transform-flow-strip-types/README.md b/packages/babel-plugin-transform-flow-strip-types/README.md index 2af58179e3..01b7634e4f 100644 --- a/packages/babel-plugin-transform-flow-strip-types/README.md +++ b/packages/babel-plugin-transform-flow-strip-types/README.md @@ -30,21 +30,21 @@ npm install --save-dev @babel/plugin-transform-flow-strip-types ```json { - "plugins": ["@babel/transform-flow-strip-types"] + "plugins": ["@babel/plugin-transform-flow-strip-types"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-flow-strip-types script.js +babel --plugins @babel/plugin-transform-flow-strip-types script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-flow-strip-types"] + plugins: ["@babel/plugin-transform-flow-strip-types"] }); ``` diff --git a/packages/babel-plugin-transform-for-of/README.md b/packages/babel-plugin-transform-for-of/README.md index d5082dfc60..0241c8722a 100644 --- a/packages/babel-plugin-transform-for-of/README.md +++ b/packages/babel-plugin-transform-for-of/README.md @@ -53,7 +53,7 @@ Without options: ```js { - "plugins": ["@babel/transform-for-of"] + "plugins": ["@babel/plugin-transform-for-of"] } ``` @@ -62,7 +62,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-for-of", { + ["@babel/plugin-transform-for-of", { "loose": true }] ] @@ -72,14 +72,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-for-of script.js +babel --plugins @babel/plugin-transform-for-of script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-for-of"] + plugins: ["@babel/plugin-transform-for-of"] }); ``` diff --git a/packages/babel-plugin-transform-function-name/README.md b/packages/babel-plugin-transform-function-name/README.md index 83ec819d2f..71c63f72d5 100644 --- a/packages/babel-plugin-transform-function-name/README.md +++ b/packages/babel-plugin-transform-function-name/README.md @@ -32,20 +32,20 @@ npm install --save-dev @babel/plugin-transform-function-name ```json { - "plugins": ["@babel/transform-function-name"] + "plugins": ["@babel/plugin-transform-function-name"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-function-name script.js +babel --plugins @babel/plugin-transform-function-name script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-function-name"] + plugins: ["@babel/plugin-transform-function-name"] }); ``` diff --git a/packages/babel-plugin-transform-instanceof/README.md b/packages/babel-plugin-transform-instanceof/README.md index d8ba47d6c4..9efe6b05a2 100644 --- a/packages/babel-plugin-transform-instanceof/README.md +++ b/packages/babel-plugin-transform-instanceof/README.md @@ -14,20 +14,20 @@ npm install --save-dev @babel/plugin-transform-instanceof ```json { - "plugins": ["@babel/transform-instanceof"] + "plugins": ["@babel/plugin-transform-instanceof"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-instanceof script.js +babel --plugins @babel/plugin-transform-instanceof script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-instanceof"] + plugins: ["@babel/plugin-transform-instanceof"] }); ``` diff --git a/packages/babel-plugin-transform-jscript/README.md b/packages/babel-plugin-transform-jscript/README.md index 2f7ebc76cb..fb90287123 100644 --- a/packages/babel-plugin-transform-jscript/README.md +++ b/packages/babel-plugin-transform-jscript/README.md @@ -38,20 +38,20 @@ npm install --save-dev @babel/plugin-transform-jscript ```json { - "plugins": ["@babel/transform-jscript"] + "plugins": ["@babel/plugin-transform-jscript"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-jscript script.js +babel --plugins @babel/plugin-transform-jscript script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-jscript"] + plugins: ["@babel/plugin-transform-jscript"] }); ``` diff --git a/packages/babel-plugin-transform-literals/README.md b/packages/babel-plugin-transform-literals/README.md index be87bf1b51..adc5c3abfb 100644 --- a/packages/babel-plugin-transform-literals/README.md +++ b/packages/babel-plugin-transform-literals/README.md @@ -34,20 +34,20 @@ npm install --save-dev @babel/plugin-transform-literals ```json { - "plugins": ["@babel/transform-literals"] + "plugins": ["@babel/plugin-transform-literals"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-literals script.js +babel --plugins @babel/plugin-transform-literals script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-literals"] + plugins: ["@babel/plugin-transform-literals"] }); ``` diff --git a/packages/babel-plugin-transform-member-expression-literals/README.md b/packages/babel-plugin-transform-member-expression-literals/README.md index ebbc592d9d..4703fef0a5 100644 --- a/packages/babel-plugin-transform-member-expression-literals/README.md +++ b/packages/babel-plugin-transform-member-expression-literals/README.md @@ -30,20 +30,20 @@ npm install --save-dev @babel/plugin-transform-member-expression-literals ```json { - "plugins": ["@babel/transform-member-expression-literals"] + "plugins": ["@babel/plugin-transform-member-expression-literals"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-member-expression-literals script.js +babel --plugins @babel/plugin-transform-member-expression-literals script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-member-expression-literals"] + plugins: ["@babel/plugin-transform-member-expression-literals"] }); ``` diff --git a/packages/babel-plugin-transform-modules-amd/README.md b/packages/babel-plugin-transform-modules-amd/README.md index c2797fb947..eecd35da2d 100644 --- a/packages/babel-plugin-transform-modules-amd/README.md +++ b/packages/babel-plugin-transform-modules-amd/README.md @@ -38,24 +38,24 @@ npm install --save-dev @babel/plugin-transform-modules-amd ```json { - "plugins": ["@babel/transform-modules-amd"] + "plugins": ["@babel/plugin-transform-modules-amd"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-modules-amd script.js +babel --plugins @babel/plugin-transform-modules-amd script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-modules-amd"] + plugins: ["@babel/plugin-transform-modules-amd"] }); ``` ### Options -See options for `babel-plugin-transform-commonjs`. +See options for `@babel/plugin-transform-modules-commonjs`. diff --git a/packages/babel-plugin-transform-modules-commonjs/README.md b/packages/babel-plugin-transform-modules-commonjs/README.md index 44c6b77581..8de45003ff 100644 --- a/packages/babel-plugin-transform-modules-commonjs/README.md +++ b/packages/babel-plugin-transform-modules-commonjs/README.md @@ -35,13 +35,13 @@ npm install --save-dev @babel/plugin-transform-modules-commonjs ```js // without options { - "plugins": ["@babel/transform-modules-commonjs"] + "plugins": ["@babel/plugin-transform-modules-commonjs"] } // with options { "plugins": [ - ["@babel/transform-modules-commonjs", { + ["@babel/plugin-transform-modules-commonjs", { "allowTopLevelThis": true }] ] @@ -51,14 +51,14 @@ npm install --save-dev @babel/plugin-transform-modules-commonjs ### Via CLI ```sh -babel --plugins @babel/transform-modules-commonjs script.js +babel --plugins @babel/plugin-transform-modules-commonjs script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-modules-commonjs"] + plugins: ["@babel/plugin-transform-modules-commonjs"] }); ``` @@ -82,7 +82,7 @@ Object.defineProperty(exports, "__esModule", { }); ``` -In environments that don't support this you can enable loose mode on `babel-plugin-transform-modules-commonjs` +In environments that don't support this you can enable loose mode on `@babel/plugin-transform-modules-commonjs` and instead of using `Object.defineProperty` an assignment will be used instead. ```javascript diff --git a/packages/babel-plugin-transform-modules-systemjs/README.md b/packages/babel-plugin-transform-modules-systemjs/README.md index 2da970cd8c..23c27bd3b3 100644 --- a/packages/babel-plugin-transform-modules-systemjs/README.md +++ b/packages/babel-plugin-transform-modules-systemjs/README.md @@ -23,7 +23,7 @@ System.register([], function (_export, _context) { }); ``` -For dynamic import support (`import('./lazy.js').then(m => ...)`), enable the [syntax-dynamic-import](https://babeljs.io/docs/plugins/syntax-dynamic-import/) plugin before this one. +For dynamic import support (`import('./lazy.js').then(m => ...)`), enable the [@babel/plugin-syntax-dynamic-import](https://babeljs.io/docs/plugins/syntax-dynamic-import/) plugin before this one. ## Installation @@ -41,7 +41,7 @@ Without options: ```json { - "plugins": ["@babel/transform-modules-systemjs"] + "plugins": ["@babel/plugin-transform-modules-systemjs"] } ``` @@ -50,7 +50,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-modules-systemjs", { + ["@babel/plugin-transform-modules-systemjs", { // outputs SystemJS.register(...) "systemGlobal": "SystemJS" }] @@ -61,13 +61,13 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-modules-systemjs script.js +babel --plugins @babel/plugin-transform-modules-systemjs script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-modules-systemjs"] + plugins: ["@babel/plugin-transform-modules-systemjs"] }); ``` diff --git a/packages/babel-plugin-transform-modules-umd/README.md b/packages/babel-plugin-transform-modules-umd/README.md index 23dcfed09e..a8a919adf2 100644 --- a/packages/babel-plugin-transform-modules-umd/README.md +++ b/packages/babel-plugin-transform-modules-umd/README.md @@ -50,7 +50,7 @@ npm install --save-dev @babel/plugin-transform-modules-umd ```json { - "plugins": ["@babel/transform-modules-umd"] + "plugins": ["@babel/plugin-transform-modules-umd"] } ``` @@ -61,7 +61,7 @@ as `global.Promise` rather than `global.es6Promise`. This can be accommodated by ```json { "plugins": [ - ["@babel/transform-modules-umd", { + ["@babel/plugin-transform-modules-umd", { "globals": { "es6-promise": "Promise" } @@ -177,8 +177,8 @@ Finally, with the plugin options set to: ```json { "plugins": [ - "external-helpers", - ["@babel/transform-modules-umd", { + "@babel/plugin-external-helpers", + ["@babel/plugin-transform-modules-umd", { "globals": { "my/custom/module/name": "My.Custom.Module.Name" }, @@ -202,13 +202,13 @@ global.My.Custom.Module.Name = mod.exports; ### Via CLI ```sh -babel --plugins @babel/transform-modules-umd script.js +babel --plugins @babel/plugin-transform-modules-umd script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-modules-umd"] + plugins: ["@babel/plugin-transform-modules-umd"] }); ``` diff --git a/packages/babel-plugin-transform-new-target/README.md b/packages/babel-plugin-transform-new-target/README.md index 1132ffd2f5..ccd5b4a407 100644 --- a/packages/babel-plugin-transform-new-target/README.md +++ b/packages/babel-plugin-transform-new-target/README.md @@ -85,20 +85,20 @@ npm install --save-dev @babel/plugin-transform-new-target ```json { - "plugins": ["@babel/transform-new-target"] + "plugins": ["@babel/plugin-transform-new-target"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-new-target script.js +babel --plugins @babel/plugin-transform-new-target script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-new-target"] + plugins: ["@babel/plugin-transform-new-target"] }); ``` diff --git a/packages/babel-plugin-transform-object-assign/README.md b/packages/babel-plugin-transform-object-assign/README.md index 00fa700656..d083e38939 100644 --- a/packages/babel-plugin-transform-object-assign/README.md +++ b/packages/babel-plugin-transform-object-assign/README.md @@ -41,20 +41,20 @@ npm install --save-dev @babel/plugin-transform-object-assign ```json { - "plugins": ["@babel/transform-object-assign"] + "plugins": ["@babel/plugin-transform-object-assign"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-object-assign script.js +babel --plugins @babel/plugin-transform-object-assign script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-object-assign"] + plugins: ["@babel/plugin-transform-object-assign"] }); ``` diff --git a/packages/babel-plugin-transform-object-set-prototype-of-to-assign/README.md b/packages/babel-plugin-transform-object-set-prototype-of-to-assign/README.md index abb53e65f1..deb10e1f4e 100644 --- a/packages/babel-plugin-transform-object-set-prototype-of-to-assign/README.md +++ b/packages/babel-plugin-transform-object-set-prototype-of-to-assign/README.md @@ -34,20 +34,20 @@ npm install --save-dev @babel/plugin-transform-object-set-prototype-of-to-assign ```json { - "plugins": ["@babel/transform-object-set-prototype-of-to-assign"] + "plugins": ["@babel/plugin-transform-object-set-prototype-of-to-assign"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-object-set-prototype-of-to-assign script.js +babel --plugins @babel/plugin-transform-object-set-prototype-of-to-assign script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-object-set-prototype-of-to-assign"] + plugins: ["@babel/plugin-transform-object-set-prototype-of-to-assign"] }); ``` diff --git a/packages/babel-plugin-transform-object-super/README.md b/packages/babel-plugin-transform-object-super/README.md index e8f2e1dacb..8fa757cfef 100644 --- a/packages/babel-plugin-transform-object-super/README.md +++ b/packages/babel-plugin-transform-object-super/README.md @@ -54,20 +54,20 @@ npm install --save-dev @babel/plugin-transform-object-super ```json { - "plugins": ["@babel/transform-object-super"] + "plugins": ["@babel/plugin-transform-object-super"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-object-super script.js +babel --plugins @babel/plugin-transform-object-super script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-object-super"] + plugins: ["@babel/plugin-transform-object-super"] }); ``` diff --git a/packages/babel-plugin-transform-parameters/README.md b/packages/babel-plugin-transform-parameters/README.md index 1629c6f15a..1c96bceee5 100644 --- a/packages/babel-plugin-transform-parameters/README.md +++ b/packages/babel-plugin-transform-parameters/README.md @@ -45,7 +45,7 @@ npm install --save-dev @babel/plugin-transform-parameters Default parameters desugar into `let` declarations to retain proper semantics. If this is not supported in your environment then you'll need the -[transform-block-scoping](http://babeljs.io/docs/plugins/transform-block-scoping) plugin. +[@babel/plugin-transform-block-scoping](http://babeljs.io/docs/plugins/transform-block-scoping) plugin. ## Usage @@ -55,21 +55,21 @@ not supported in your environment then you'll need the ```json { - "plugins": ["@babel/transform-parameters"] + "plugins": ["@babel/plugin-transform-parameters"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-parameters script.js +babel --plugins @babel/plugin-transform-parameters script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-parameters"] + plugins: ["@babel/plugin-transform-parameters"] }); ``` diff --git a/packages/babel-plugin-transform-property-literals/README.md b/packages/babel-plugin-transform-property-literals/README.md index 40d2b88c9d..3513c3372a 100644 --- a/packages/babel-plugin-transform-property-literals/README.md +++ b/packages/babel-plugin-transform-property-literals/README.md @@ -34,20 +34,20 @@ npm install --save-dev @babel/plugin-transform-property-literals ```json { - "plugins": ["@babel/transform-property-literals"] + "plugins": ["@babel/plugin-transform-property-literals"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-property-literals script.js +babel --plugins @babel/plugin-transform-property-literals script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-property-literals"] + plugins: ["@babel/plugin-transform-property-literals"] }); ``` diff --git a/packages/babel-plugin-transform-property-mutators/README.md b/packages/babel-plugin-transform-property-mutators/README.md index 814ab093c1..68602f9173 100644 --- a/packages/babel-plugin-transform-property-mutators/README.md +++ b/packages/babel-plugin-transform-property-mutators/README.md @@ -42,20 +42,20 @@ npm install --save-dev @babel/plugin-transform-property-mutators ```json { - "plugins": ["@babel/transform-property-mutators"] + "plugins": ["@babel/plugin-transform-property-mutators"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-property-mutators script.js +babel --plugins @babel/plugin-transform-property-mutators script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-property-mutators"] + plugins: ["@babel/plugin-transform-property-mutators"] }); ``` diff --git a/packages/babel-plugin-transform-proto-to-assign/README.md b/packages/babel-plugin-transform-proto-to-assign/README.md index 409598024e..83db311ad3 100644 --- a/packages/babel-plugin-transform-proto-to-assign/README.md +++ b/packages/babel-plugin-transform-proto-to-assign/README.md @@ -57,20 +57,20 @@ npm install --save-dev @babel/plugin-transform-proto-to-assign ```json { - "plugins": ["@babel/transform-proto-to-assign"] + "plugins": ["@babel/plugin-transform-proto-to-assign"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-proto-to-assign script.js +babel --plugins @babel/plugin-transform-proto-to-assign script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-proto-to-assign"] + plugins: ["@babel/plugin-transform-proto-to-assign"] }); ``` diff --git a/packages/babel-plugin-transform-react-constant-elements/README.md b/packages/babel-plugin-transform-react-constant-elements/README.md index ebe7fb4569..8bec894bad 100644 --- a/packages/babel-plugin-transform-react-constant-elements/README.md +++ b/packages/babel-plugin-transform-react-constant-elements/README.md @@ -62,7 +62,7 @@ npm install --save-dev @babel/plugin-transform-react-constant-elements ```json { - "plugins": ["@babel/transform-react-constant-elements"] + "plugins": ["@babel/plugin-transform-react-constant-elements"] } ``` @@ -80,7 +80,7 @@ This will skip the `Mutable Properties` deopt. ```json { "plugins": [ - ["@babel/transform-react-constant-elements", {"allowMutablePropsOnTags": ["FormattedMessage"]}], + ["@babel/plugin-transform-react-constant-elements", {"allowMutablePropsOnTags": ["FormattedMessage"]}], ] } @@ -89,14 +89,14 @@ This will skip the `Mutable Properties` deopt. ### Via CLI ```sh -babel --plugins @babel/transform-react-constant-elements script.js +babel --plugins @babel/plugin-transform-react-constant-elements script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-react-constant-elements"] + plugins: ["@babel/plugin-transform-react-constant-elements"] }); ``` diff --git a/packages/babel-plugin-transform-react-display-name/README.md b/packages/babel-plugin-transform-react-display-name/README.md index dce60f679f..53e8e4f6ad 100644 --- a/packages/babel-plugin-transform-react-display-name/README.md +++ b/packages/babel-plugin-transform-react-display-name/README.md @@ -36,20 +36,20 @@ npm install --save-dev @babel/plugin-transform-react-display-name ```json { - "plugins": ["@babel/transform-react-display-name"] + "plugins": ["@babel/plugin-transform-react-display-name"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-react-display-name script.js +babel --plugins @babel/plugin-transform-react-display-name script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-react-display-name"] + plugins: ["@babel/plugin-transform-react-display-name"] }); ``` diff --git a/packages/babel-plugin-transform-react-inline-elements/README.md b/packages/babel-plugin-transform-react-inline-elements/README.md index e430e31e57..dc614f25e5 100644 --- a/packages/babel-plugin-transform-react-inline-elements/README.md +++ b/packages/babel-plugin-transform-react-inline-elements/README.md @@ -4,9 +4,9 @@ ## Note -When used alongside `transform-runtime`, polyfills (by default including `Symbol`) are specifically scoped to not pollute the global scope. This breaks usage with React, as it won't have access to that polyfill and will cause your application to fail in legacy browsers. +When used alongside `@babel/plugin-transform-runtime`, polyfills (by default including `Symbol`) are specifically scoped to not pollute the global scope. This breaks usage with React, as it won't have access to that polyfill and will cause your application to fail in legacy browsers. -Even if `['transform-runtime', { helpers: true, polyfill: false }]` is specified, it might still break, since `helpers` come precompiled. +Even if `['@babel/plugin-transform-runtime', { helpers: true, polyfill: false }]` is specified, it might still break, since `helpers` come precompiled. In this case, we recommend importing/requiring `@babel/polyfill` in the entry point of your application and using `@babel/preset-env` with the `useBuiltIns` option to only include the polyfills your targets need. Alternatively, you can also import/require `core-js/modules/es6.symbol` by itself. @@ -59,21 +59,21 @@ npm install --save-dev @babel/plugin-transform-react-inline-elements ```json { - "plugins": ["@babel/transform-react-inline-elements"] + "plugins": ["@babel/plugin-transform-react-inline-elements"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-react-inline-elements script.js +babel --plugins @babel/plugin-transform-react-inline-elements script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-react-inline-elements"] + plugins: ["@babel/plugin-transform-react-inline-elements"] }); ``` diff --git a/packages/babel-plugin-transform-react-jsx-compat/README.md b/packages/babel-plugin-transform-react-jsx-compat/README.md index f026990527..1c84d9c6a9 100644 --- a/packages/babel-plugin-transform-react-jsx-compat/README.md +++ b/packages/babel-plugin-transform-react-jsx-compat/README.md @@ -36,20 +36,20 @@ npm install --save-dev @babel/plugin-transform-react-jsx-compat ```json { - "plugins": ["@babel/transform-react-jsx-compat"] + "plugins": ["@babel/plugin-transform-react-jsx-compat"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-react-jsx-compat script.js +babel --plugins @babel/plugin-transform-react-jsx-compat script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-react-jsx-compat"] + plugins: ["@babel/plugin-transform-react-jsx-compat"] }); ``` diff --git a/packages/babel-plugin-transform-react-jsx-self/README.md b/packages/babel-plugin-transform-react-jsx-self/README.md index 656b51b695..9b6d78f44b 100644 --- a/packages/babel-plugin-transform-react-jsx-self/README.md +++ b/packages/babel-plugin-transform-react-jsx-self/README.md @@ -30,20 +30,20 @@ npm install --save-dev @babel/plugin-transform-react-jsx-self ```json { - "plugins": ["@babel/transform-react-jsx-self"] + "plugins": ["@babel/plugin-transform-react-jsx-self"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-react-jsx-self script.js +babel --plugins @babel/plugin-transform-react-jsx-self script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-react-jsx-self"] + plugins: ["@babel/plugin-transform-react-jsx-self"] }); ``` diff --git a/packages/babel-plugin-transform-react-jsx-source/README.md b/packages/babel-plugin-transform-react-jsx-source/README.md index cfc179d813..705d8feeca 100644 --- a/packages/babel-plugin-transform-react-jsx-source/README.md +++ b/packages/babel-plugin-transform-react-jsx-source/README.md @@ -30,20 +30,20 @@ npm install --save-dev @babel/plugin-transform-react-jsx-source ```json { - "plugins": ["@babel/transform-react-jsx-source"] + "plugins": ["@babel/plugin-transform-react-jsx-source"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-react-jsx-source script.js +babel --plugins @babel/plugin-transform-react-jsx-source script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-react-jsx-source"] + plugins: ["@babel/plugin-transform-react-jsx-source"] }); ``` diff --git a/packages/babel-plugin-transform-react-jsx/README.md b/packages/babel-plugin-transform-react-jsx/README.md index 83f757e0a6..b840cdcc46 100644 --- a/packages/babel-plugin-transform-react-jsx/README.md +++ b/packages/babel-plugin-transform-react-jsx/README.md @@ -132,7 +132,7 @@ Without options: ```json { - "plugins": ["@babel/transform-react-jsx"] + "plugins": ["@babel/plugin-transform-react-jsx"] } ``` @@ -141,7 +141,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-react-jsx", { + ["@babel/plugin-transform-react-jsx", { "pragma": "dom", // default pragma is React.createElement "pragmaFrag": "DomFrag", // default is React.Fragment "throwIfNamespace": false // defaults to true @@ -153,14 +153,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-react-jsx script.js +babel --plugins @babel/plugin-transform-react-jsx script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-react-jsx"] + plugins: ["@babel/plugin-transform-react-jsx"] }); ``` diff --git a/packages/babel-plugin-transform-regenerator/README.md b/packages/babel-plugin-transform-regenerator/README.md index f0a0fc0bc5..47b192a917 100644 --- a/packages/babel-plugin-transform-regenerator/README.md +++ b/packages/babel-plugin-transform-regenerator/README.md @@ -48,7 +48,7 @@ Without options: ```json { - "plugins": ["@babel/transform-regenerator"] + "plugins": ["@babel/plugin-transform-regenerator"] } ``` @@ -63,7 +63,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-regenerator", { + ["@babel/plugin-transform-regenerator", { "asyncGenerators": false, "generators": false, "async": false @@ -75,13 +75,13 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-regenerator script.js +babel --plugins @babel/plugin-transform-regenerator script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-regenerator"] + plugins: ["@babel/plugin-transform-regenerator"] }); ``` diff --git a/packages/babel-plugin-transform-runtime/README.md b/packages/babel-plugin-transform-runtime/README.md index 7972a95194..7b39101fd7 100644 --- a/packages/babel-plugin-transform-runtime/README.md +++ b/packages/babel-plugin-transform-runtime/README.md @@ -8,7 +8,7 @@ NOTE: Instance methods such as `"foobar".includes("foo")` will not work since th Babel uses very small helpers for common functions such as `_extend`. By default this will be added to every file that requires it. This duplication is sometimes unnecessary, especially when your application is spread out over multiple files. -This is where the `transform-runtime` plugin comes in: all of the helpers will reference the module `@babel/runtime` to avoid duplication across your compiled output. The runtime will be compiled into your build. +This is where the `@babel/plugin-transform-runtime` plugin comes in: all of the helpers will reference the module `@babel/runtime` to avoid duplication across your compiled output. The runtime will be compiled into your build. Another purpose of this transformer is to create a sandboxed environment for your code. If you use [@babel/polyfill](http://babeljs.io/docs/usage/polyfill/) and the built-ins it provides such as `Promise`, `Set` and `Map`, those will pollute the global scope. While this might be ok for an app or a command line tool, it becomes a problem if your code is a library which you intend to publish for others to use or if you can't exactly control the environment in which your code will run. @@ -44,7 +44,7 @@ Without options: ```json { - "plugins": ["@babel/transform-runtime"] + "plugins": ["@babel/plugin-transform-runtime"] } ``` @@ -53,7 +53,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-runtime", { + ["@babel/plugin-transform-runtime", { "helpers": false, "polyfill": false, "regenerator": true, @@ -66,14 +66,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-runtime script.js +babel --plugins @babel/plugin-transform-runtime script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-runtime"] + plugins: ["@babel/plugin-transform-runtime"] }); ``` @@ -171,7 +171,7 @@ exports.default = function (left, right) { `boolean`, defaults to `false`. When enabled, the transform will use helpers that do not get run through -`transform-modules-commonjs`. This allows for smaller builds in module +`@babel/plugin-transform-modules-commonjs`. This allows for smaller builds in module systems like webpack, since it doesn't need to preserve commonjs semantics. For example, here is the `classCallCheck` helper with `useESModules` disabled: diff --git a/packages/babel-plugin-transform-shorthand-properties/README.md b/packages/babel-plugin-transform-shorthand-properties/README.md index 90d68ceb4a..917c783fd0 100644 --- a/packages/babel-plugin-transform-shorthand-properties/README.md +++ b/packages/babel-plugin-transform-shorthand-properties/README.md @@ -50,20 +50,20 @@ npm install --save-dev @babel/plugin-transform-shorthand-properties ```json { - "plugins": ["@babel/transform-shorthand-properties"] + "plugins": ["@babel/plugin-transform-shorthand-properties"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-shorthand-properties script.js +babel --plugins @babel/plugin-transform-shorthand-properties script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-shorthand-properties"] + plugins: ["@babel/plugin-transform-shorthand-properties"] }); ``` diff --git a/packages/babel-plugin-transform-spread/README.md b/packages/babel-plugin-transform-spread/README.md index 42aaf881d7..e832bb2981 100644 --- a/packages/babel-plugin-transform-spread/README.md +++ b/packages/babel-plugin-transform-spread/README.md @@ -34,7 +34,7 @@ Without options: ```json { - "plugins": ["@babel/transform-spread"] + "plugins": ["@babel/plugin-transform-spread"] } ``` @@ -43,7 +43,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-spread", { + ["@babel/plugin-transform-spread", { "loose": true }] ] @@ -53,14 +53,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-spread script.js +babel --plugins @babel/plugin-transform-spread script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-spread"] + plugins: ["@babel/plugin-transform-spread"] }); ``` diff --git a/packages/babel-plugin-transform-sticky-regex/README.md b/packages/babel-plugin-transform-sticky-regex/README.md index 2a1561944f..8c1bb2f82d 100644 --- a/packages/babel-plugin-transform-sticky-regex/README.md +++ b/packages/babel-plugin-transform-sticky-regex/README.md @@ -30,20 +30,20 @@ npm install --save-dev @babel/plugin-transform-sticky-regex ```json { - "plugins": ["@babel/transform-sticky-regex"] + "plugins": ["@babel/plugin-transform-sticky-regex"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-sticky-regex script.js +babel --plugins @babel/plugin-transform-sticky-regex script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-sticky-regex"] + plugins: ["@babel/plugin-transform-sticky-regex"] }); ``` diff --git a/packages/babel-plugin-transform-strict-mode/README.md b/packages/babel-plugin-transform-strict-mode/README.md index b7b249a479..483143958b 100644 --- a/packages/babel-plugin-transform-strict-mode/README.md +++ b/packages/babel-plugin-transform-strict-mode/README.md @@ -37,7 +37,7 @@ npm install --save-dev @babel/plugin-transform-strict-mode ```json { - "plugins": ["@babel/transform-strict-mode"] + "plugins": ["@babel/plugin-transform-strict-mode"] } ``` @@ -45,13 +45,13 @@ npm install --save-dev @babel/plugin-transform-strict-mode ### Via CLI ```sh -babel --plugins @babel/transform-strict-mode script.js +babel --plugins @babel/plugin-transform-strict-mode script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-strict-mode"] + plugins: ["@babel/plugin-transform-strict-mode"] }); ``` diff --git a/packages/babel-plugin-transform-template-literals/README.md b/packages/babel-plugin-transform-template-literals/README.md index 5a911ee3b4..d22f3b9209 100644 --- a/packages/babel-plugin-transform-template-literals/README.md +++ b/packages/babel-plugin-transform-template-literals/README.md @@ -32,7 +32,7 @@ Without options: ```json { - "plugins": ["@babel/transform-template-literals"] + "plugins": ["@babel/plugin-transform-template-literals"] } ``` @@ -41,7 +41,7 @@ With options: ```json { "plugins": [ - ["@babel/transform-template-literals", { + ["@babel/plugin-transform-template-literals", { "loose": true }] ] @@ -51,14 +51,14 @@ With options: ### Via CLI ```sh -babel --plugins @babel/transform-template-literals script.js +babel --plugins @babel/plugin-transform-template-literals script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-template-literals"] + plugins: ["@babel/plugin-transform-template-literals"] }); ``` diff --git a/packages/babel-plugin-transform-typeof-symbol/README.md b/packages/babel-plugin-transform-typeof-symbol/README.md index fc1a1b4825..03aa17040b 100644 --- a/packages/babel-plugin-transform-typeof-symbol/README.md +++ b/packages/babel-plugin-transform-typeof-symbol/README.md @@ -34,20 +34,20 @@ npm install --save-dev @babel/plugin-transform-typeof-symbol ```json { - "plugins": ["@babel/transform-typeof-symbol"] + "plugins": ["@babel/plugin-transform-typeof-symbol"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-typeof-symbol script.js +babel --plugins @babel/plugin-transform-typeof-symbol script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-typeof-symbol"] + plugins: ["@babel/plugin-transform-typeof-symbol"] }); ``` diff --git a/packages/babel-plugin-transform-typescript/README.md b/packages/babel-plugin-transform-typescript/README.md index 0308aa1154..fdff26cdec 100644 --- a/packages/babel-plugin-transform-typescript/README.md +++ b/packages/babel-plugin-transform-typescript/README.md @@ -35,20 +35,20 @@ npm install --save-dev @babel/plugin-transform-typescript ```json { - "plugins": ["@babel/transform-typescript"] + "plugins": ["@babel/plugin-transform-typescript"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-typescript script.js +babel --plugins @babel/plugin-transform-typescript script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-typescript"] + plugins: ["@babel/plugin-transform-typescript"] }); ``` diff --git a/packages/babel-plugin-transform-unicode-regex/README.md b/packages/babel-plugin-transform-unicode-regex/README.md index cf2f32f4f7..a6d79cf77b 100644 --- a/packages/babel-plugin-transform-unicode-regex/README.md +++ b/packages/babel-plugin-transform-unicode-regex/README.md @@ -32,20 +32,20 @@ npm install --save-dev @babel/plugin-transform-unicode-regex ```json { - "plugins": ["@babel/transform-unicode-regex"] + "plugins": ["@babel/plugin-transform-unicode-regex"] } ``` ### Via CLI ```sh -babel --plugins @babel/transform-unicode-regex script.js +babel --plugins @babel/plugin-transform-unicode-regex script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - plugins: ["@babel/transform-unicode-regex"] + plugins: ["@babel/plugin-transform-unicode-regex"] }); ``` diff --git a/packages/babel-preset-es2015/README.md b/packages/babel-preset-es2015/README.md index ba8a900026..7044d19a45 100644 --- a/packages/babel-preset-es2015/README.md +++ b/packages/babel-preset-es2015/README.md @@ -16,21 +16,21 @@ npm install --save-dev @babel/preset-es2015 ```json { - "presets": ["@babel/es2015"] + "presets": ["@babel/preset-es2015"] } ``` ### Via CLI ```sh -babel script.js --presets @babel/es2015 +babel script.js --presets @babel/preset-es2015 ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/es2015"] + presets: ["@babel/preset-es2015"] }); ``` diff --git a/packages/babel-preset-es2016/README.md b/packages/babel-preset-es2016/README.md index facf52a5ae..117ee42462 100644 --- a/packages/babel-preset-es2016/README.md +++ b/packages/babel-preset-es2016/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/preset-es2016 ```json { - "presets": ["@babel/es2016"] + "presets": ["@babel/preset-es2016"] } ``` ### Via CLI ```sh -babel script.js --presets @babel/es2016 +babel script.js --presets @babel/preset-es2016 ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/es2016"] + presets: ["@babel/preset-es2016"] }); ``` diff --git a/packages/babel-preset-es2017/README.md b/packages/babel-preset-es2017/README.md index f8f621bf05..78eeefb7ca 100644 --- a/packages/babel-preset-es2017/README.md +++ b/packages/babel-preset-es2017/README.md @@ -16,20 +16,20 @@ npm install --save-dev @babel/preset-es2017 ```json { - "presets": ["@babel/es2017"] + "presets": ["@babel/preset-es2017"] } ``` ### Via CLI ```sh -babel script.js --presets @babel/es2017 +babel script.js --presets @babel/preset-es2017 ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/es2017"] + presets: ["@babel/preset-es2017"] }); ``` diff --git a/packages/babel-preset-flow/README.md b/packages/babel-preset-flow/README.md index f768b2b3bc..91fba20510 100644 --- a/packages/babel-preset-flow/README.md +++ b/packages/babel-preset-flow/README.md @@ -4,7 +4,7 @@ This preset includes the following plugins: -- [transform-flow-strip-types](https://babeljs.io/docs/plugins/transform-flow-strip-types/) +- [@babel/plugin-transform-flow-strip-types](https://babeljs.io/docs/plugins/transform-flow-strip-types/) ## Example @@ -34,20 +34,20 @@ npm install --save-dev @babel/preset-flow ```json { - "presets": ["@babel/flow"] + "presets": ["@babel/preset-flow"] } ``` ### Via CLI ```sh -babel --presets @babel/flow script.js +babel --presets @babel/preset-flow script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/flow"] + presets: ["@babel/preset-flow"] }); ``` diff --git a/packages/babel-preset-react/README.md b/packages/babel-preset-react/README.md index e45e1b94dc..fcb7b58117 100644 --- a/packages/babel-preset-react/README.md +++ b/packages/babel-preset-react/README.md @@ -4,14 +4,14 @@ This preset always includes the following plugins: -- [syntax-jsx](https://babeljs.io/docs/plugins/syntax-jsx/) -- [transform-react-jsx](https://babeljs.io/docs/plugins/transform-react-jsx/) -- [transform-react-display-name](https://babeljs.io/docs/plugins/transform-react-display-name/) +- [@babel/plugin-syntax-jsx](https://babeljs.io/docs/plugins/syntax-jsx/) +- [@babel/plugin-transform-react-jsx](https://babeljs.io/docs/plugins/transform-react-jsx/) +- [@babel/plugin-transform-react-display-name](https://babeljs.io/docs/plugins/transform-react-display-name/) And with the `development` option: -- [transform-react-jsx-self](https://babeljs.io/docs/plugins/transform-react-jsx-self/) -- [transform-react-jsx-source](https://babeljs.io/docs/plugins/transform-react-jsx-source/) +- [@babel/plugin-transform-react-jsx-self](https://babeljs.io/docs/plugins/transform-react-jsx-self/) +- [@babel/plugin-transform-react-jsx-source](https://babeljs.io/docs/plugins/transform-react-jsx-source/) > Note: Flow syntax support is no longer enabled in v7. For that, you will need to add the [Flow preset](https://babeljs.io/docs/plugins/preset-flow/). @@ -33,7 +33,7 @@ Without options: ```json { - "presets": ["@babel/react"] + "presets": ["@babel/preset-react"] } ``` @@ -42,7 +42,7 @@ With options: ```json { "presets": [ - ["@babel/react", { + ["@babel/preset-react", { "pragma": "dom", // default pragma is React.createElement "pragmaFrag": "DomFrag", // default is React.Fragment "throwIfNamespace": false // defaults to true @@ -54,14 +54,14 @@ With options: ### Via CLI ```sh -babel --presets @babel/react script.js +babel --presets @babel/preset-react script.js ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/react"] + presets: ["@babel/preset-react"] }); ``` @@ -108,7 +108,7 @@ Though the JSX spec allows this, it is disabled by default since React's JSX doe ```js module.exports = { presets: [ - ["@babel/react", { + ["@babel/preset-react", { development: process.env.BABEL_ENV === "development", }], ], @@ -121,11 +121,11 @@ module.exports = { ```json { - "presets": ["@babel/react"], + "presets": ["@babel/preset-react"], "env": { "development": { "presets": [ - ["@babel/react", { "development": true }] + ["@babel/preset-react", { "development": true }] ] } } diff --git a/packages/babel-preset-stage-0/README.md b/packages/babel-preset-stage-0/README.md index 0fa0338e1f..b67d1259e2 100644 --- a/packages/babel-preset-stage-0/README.md +++ b/packages/babel-preset-stage-0/README.md @@ -16,21 +16,21 @@ npm install --save-dev @babel/preset-stage-0 ```json { - "presets": ["@babel/stage-0"] + "presets": ["@babel/preset-stage-0"] } ``` ### Via CLI ```sh -babel script.js --presets @babel/stage-0 +babel script.js --presets @babel/preset-stage-0 ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/stage-0"] + presets: ["@babel/preset-stage-0"] }); ``` diff --git a/packages/babel-preset-stage-1/README.md b/packages/babel-preset-stage-1/README.md index 5a8f2623eb..735f6dd90b 100644 --- a/packages/babel-preset-stage-1/README.md +++ b/packages/babel-preset-stage-1/README.md @@ -26,21 +26,21 @@ npm install --save-dev @babel/preset-stage-1 ```json { - "presets": ["@babel/stage-1"] + "presets": ["@babel/preset-stage-1"] } ``` ### Via CLI ```sh -babel script.js --presets @babel/stage-1 +babel script.js --presets @babel/preset-stage-1 ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/stage-1"] + presets: ["@babel/preset-stage-1"] }); ``` diff --git a/packages/babel-preset-stage-2/README.md b/packages/babel-preset-stage-2/README.md index d2f0519bf1..60131d788a 100644 --- a/packages/babel-preset-stage-2/README.md +++ b/packages/babel-preset-stage-2/README.md @@ -26,21 +26,21 @@ npm install --save-dev @babel/preset-stage-2 ```json { - "presets": ["@babel/stage-2"] + "presets": ["@babel/preset-stage-2"] } ``` ### Via CLI ```sh -babel script.js --presets @babel/stage-2 +babel script.js --presets @babel/preset-stage-2 ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/stage-2"] + presets: ["@babel/preset-stage-2"] }); ``` diff --git a/packages/babel-preset-stage-3/README.md b/packages/babel-preset-stage-3/README.md index 034f050014..ea52dedcb7 100644 --- a/packages/babel-preset-stage-3/README.md +++ b/packages/babel-preset-stage-3/README.md @@ -26,21 +26,21 @@ npm install --save-dev @babel/preset-stage-3 ```json { - "presets": ["@babel/stage-3"] + "presets": ["@babel/preset-stage-3"] } ``` ### Via CLI ```sh -babel script.js --presets @babel/stage-3 +babel script.js --presets @babel/preset-stage-3 ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/stage-3"] + presets: ["@babel/preset-stage-3"] }); ``` diff --git a/packages/babel-preset-typescript/README.md b/packages/babel-preset-typescript/README.md index e0073e6d94..a326eac1dc 100644 --- a/packages/babel-preset-typescript/README.md +++ b/packages/babel-preset-typescript/README.md @@ -4,9 +4,9 @@ This preset includes the following plugins: -- [transform-typescript](https://babeljs.io/docs/plugins/transform-typescript/) +- [@babel/plugin-transform-typescript](https://babeljs.io/docs/plugins/transform-typescript/) -> You will need to specify `--extensions ".ts"` for `babel-cli`, `babel-node` to handle `.ts` files. +> You will need to specify `--extensions ".ts"` for `@babel/cli` & `@babel/node` cli's to handle `.ts` files. ## Example @@ -36,20 +36,20 @@ npm install --save-dev @babel/preset-typescript ```json { - "presets": ["@babel/typescript"] + "presets": ["@babel/preset-typescript"] } ``` ### Via CLI ```sh -babel --presets @babel/typescript script.ts +babel --presets @babel/preset-typescript script.ts ``` ### Via Node API ```javascript require("@babel/core").transform("code", { - presets: ["@babel/typescript"] + presets: ["@babel/preset-typescript"] }); ``` diff --git a/packages/babel-register/README.md b/packages/babel-register/README.md index c2c512b995..ce0ab6d7f3 100644 --- a/packages/babel-register/README.md +++ b/packages/babel-register/README.md @@ -79,7 +79,7 @@ to each file still applies, and takes precedence over any options you pass in he ## Environment variables -By default `babel-node` and `@babel/register` will save to a json cache in your +By default `@babel/node` cli and `@babel/register` will save to a json cache in your temporary directory. This will heavily improve with the startup and compilation of your files. There diff --git a/packages/babel-template/README.md b/packages/babel-template/README.md index a591bddf8a..0219286c3f 100644 --- a/packages/babel-template/README.md +++ b/packages/babel-template/README.md @@ -88,7 +88,7 @@ valid to perform replacements using template literal replacements. ## AST results -The `babel-template` API exposes a few flexible APIs to make it as easy as +The `@babel/template` API exposes a few flexible APIs to make it as easy as possible to create ASTs with an expected structure. Each of these also has the `.ast` property mentioned above.