[skip ci] removed shorthand usage of official babel scoped presets & plugins from README.md's (#6820)

This commit is contained in:
Steven Hargrove
2017-11-16 22:51:23 -05:00
committed by Henry Zhu
parent 39dae28d5c
commit cee9ae48e0
101 changed files with 381 additions and 381 deletions

View File

@@ -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"]
});
```