add syntax plugins
This commit is contained in:
parent
f88cc9d509
commit
9113542b12
3
packages/babel-plugin-syntax-async-functions/.npmignore
Normal file
3
packages/babel-plugin-syntax-async-functions/.npmignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
35
packages/babel-plugin-syntax-async-functions/README.md
Normal file
35
packages/babel-plugin-syntax-async-functions/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# babel-plugin-syntax-async-functions
|
||||
|
||||
Allow parsing of async functions.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install babel-plugin-syntax-async-functions
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["syntax-async-functions"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
$ babel --plugins syntax-async-functions script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("babel-core").transform("code", {
|
||||
plugins: ["syntax-async-functions"]
|
||||
});
|
||||
```
|
||||
11
packages/babel-plugin-syntax-async-functions/package.json
Normal file
11
packages/babel-plugin-syntax-async-functions/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-async-functions",
|
||||
"version": "1.0.0",
|
||||
"description": "Allow parsing of async functions",
|
||||
"repository": "babel/babel",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("asyncFunctions");
|
||||
}
|
||||
};
|
||||
}
|
||||
3
packages/babel-plugin-syntax-class-properties/.npmignore
Normal file
3
packages/babel-plugin-syntax-class-properties/.npmignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
35
packages/babel-plugin-syntax-class-properties/README.md
Normal file
35
packages/babel-plugin-syntax-class-properties/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# babel-plugin-syntax-class-properties
|
||||
|
||||
Allow parsing of class properties.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install babel-plugin-syntax-class-properties
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["syntax-class-properties"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
$ babel --plugins syntax-class-properties script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("babel-core").transform("code", {
|
||||
plugins: ["syntax-class-properties"]
|
||||
});
|
||||
```
|
||||
11
packages/babel-plugin-syntax-class-properties/package.json
Normal file
11
packages/babel-plugin-syntax-class-properties/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-class-properties",
|
||||
"version": "1.0.0",
|
||||
"description": "Allow parsing of class properties",
|
||||
"repository": "babel/babel",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("classProperties");
|
||||
}
|
||||
};
|
||||
}
|
||||
3
packages/babel-plugin-syntax-decorators/.npmignore
Normal file
3
packages/babel-plugin-syntax-decorators/.npmignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
35
packages/babel-plugin-syntax-decorators/README.md
Normal file
35
packages/babel-plugin-syntax-decorators/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# babel-plugin-syntax-decorators
|
||||
|
||||
Allow parsing of decorators.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install babel-plugin-syntax-decorators
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["syntax-decorators"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
$ babel --plugins syntax-decorators script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("babel-core").transform("code", {
|
||||
plugins: ["syntax-decorators"]
|
||||
});
|
||||
```
|
||||
11
packages/babel-plugin-syntax-decorators/package.json
Normal file
11
packages/babel-plugin-syntax-decorators/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-decorators",
|
||||
"version": "1.0.0",
|
||||
"description": "Allow parsing of decorators",
|
||||
"repository": "babel/babel",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
]
|
||||
}
|
||||
7
packages/babel-plugin-syntax-decorators/src/index.js
Normal file
7
packages/babel-plugin-syntax-decorators/src/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("decorators");
|
||||
}
|
||||
};
|
||||
}
|
||||
3
packages/babel-plugin-syntax-do-expressions/.npmignore
Normal file
3
packages/babel-plugin-syntax-do-expressions/.npmignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
35
packages/babel-plugin-syntax-do-expressions/README.md
Normal file
35
packages/babel-plugin-syntax-do-expressions/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# babel-plugin-syntax-do-expressions
|
||||
|
||||
Allow parsing of do expressions.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install babel-plugin-syntax-do-expressions
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["syntax-do-expressions"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
$ babel --plugins syntax-do-expressions script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("babel-core").transform("code", {
|
||||
plugins: ["syntax-do-expressions"]
|
||||
});
|
||||
```
|
||||
11
packages/babel-plugin-syntax-do-expressions/package.json
Normal file
11
packages/babel-plugin-syntax-do-expressions/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-do-expressions",
|
||||
"version": "1.0.0",
|
||||
"description": "Allow parsing of do expressions",
|
||||
"repository": "babel/babel",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
]
|
||||
}
|
||||
7
packages/babel-plugin-syntax-do-expressions/src/index.js
Normal file
7
packages/babel-plugin-syntax-do-expressions/src/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("doExpressions");
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
@ -0,0 +1,35 @@
|
||||
# babel-plugin-syntax-exponentiation-operator
|
||||
|
||||
Allow parsing of the exponentiation operator.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install babel-plugin-syntax-exponentiation-operator
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["syntax-exponentiation-operator"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
$ babel --plugins syntax-exponentiation-operator script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("babel-core").transform("code", {
|
||||
plugins: ["syntax-exponentiation-operator"]
|
||||
});
|
||||
```
|
||||
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-exponentiation-operator",
|
||||
"version": "1.0.0",
|
||||
"description": "Allow parsing of the exponentiation operator",
|
||||
"repository": "babel/babel",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("exponentiationOperator");
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
35
packages/babel-plugin-syntax-export-extensions/README.md
Normal file
35
packages/babel-plugin-syntax-export-extensions/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# babel-plugin-syntax-export-extensions
|
||||
|
||||
Allow parsing of export extensions.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install babel-plugin-syntax-export-extensions
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["syntax-export-extensions"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
$ babel --plugins syntax-export-extensions script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("babel-core").transform("code", {
|
||||
plugins: ["syntax-export-extensions"]
|
||||
});
|
||||
```
|
||||
11
packages/babel-plugin-syntax-export-extensions/package.json
Normal file
11
packages/babel-plugin-syntax-export-extensions/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-export-extensions",
|
||||
"version": "1.0.0",
|
||||
"description": "Allow parsing of export extensions",
|
||||
"repository": "babel/babel",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("exportExtensions");
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -1,11 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
var jsx = parserOpts.plugins.jsx;
|
||||
delete parserOpts.plugins.jsx;
|
||||
|
||||
parserOpts.plugins.flow = true;
|
||||
if (jsx) parserOpts.plugins.jsx = true;
|
||||
parserOpts.plugins.push("flow");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
3
packages/babel-plugin-syntax-function-bind/.npmignore
Normal file
3
packages/babel-plugin-syntax-function-bind/.npmignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
35
packages/babel-plugin-syntax-function-bind/README.md
Normal file
35
packages/babel-plugin-syntax-function-bind/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# babel-plugin-syntax-function-bind
|
||||
|
||||
Allow parsing of function bind.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install babel-plugin-syntax-function-bind
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["syntax-function-bind"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
$ babel --plugins syntax-function-bind script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("babel-core").transform("code", {
|
||||
plugins: ["syntax-function-bind"]
|
||||
});
|
||||
```
|
||||
11
packages/babel-plugin-syntax-function-bind/package.json
Normal file
11
packages/babel-plugin-syntax-function-bind/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-function-bind",
|
||||
"version": "1.0.0",
|
||||
"description": "Allow parsing of function bind",
|
||||
"repository": "babel/babel",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
]
|
||||
}
|
||||
7
packages/babel-plugin-syntax-function-bind/src/index.js
Normal file
7
packages/babel-plugin-syntax-function-bind/src/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("functionBind");
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.jsx = true;
|
||||
parserOpts.plugins.push("jsx");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
*.log
|
||||
src
|
||||
35
packages/babel-plugin-syntax-object-rest-spread/README.md
Normal file
35
packages/babel-plugin-syntax-object-rest-spread/README.md
Normal file
@ -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"]
|
||||
});
|
||||
```
|
||||
11
packages/babel-plugin-syntax-object-rest-spread/package.json
Normal file
11
packages/babel-plugin-syntax-object-rest-spread/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "babel-plugin-syntax-object-rest-spread",
|
||||
"version": "1.0.0",
|
||||
"description": "Allow parsing of object rest/spread",
|
||||
"repository": "babel/babel",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("objectRestSpread");
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
export default function () {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.features["es7.trailingFunctionCommas"] = true;
|
||||
parserOpts.plugins.push("trailingFunctionCommas");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user