chushihua
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
# babel-plugin-syntax-object-rest-spread
|
||||
|
||||
Allow parsing of object rest/spread.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install babel-plugin-syntax-object-rest-spread
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["syntax-object-rest-spread"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
$ babel --plugins syntax-object-rest-spread script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("babel-core").transform("code", {
|
||||
plugins: ["syntax-object-rest-spread"]
|
||||
});
|
||||
```
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
exports.default = function () {
|
||||
return {
|
||||
manipulateOptions: function manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("objectRestSpread");
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = exports["default"];
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-object-rest-spread",
|
||||
"version": "6.13.0",
|
||||
"description": "Allow parsing of object rest/spread",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-object-rest-spread",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {}
|
||||
}
|
||||
Reference in New Issue
Block a user