add babel-plugin-syntax-function-sent plugin

This commit is contained in:
Sebastian McKenzie 2015-11-18 20:32:11 -08:00
parent 8fd543edae
commit 94887d35e1
4 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,3 @@
node_modules
*.log
src

View File

@ -0,0 +1,35 @@
# babel-plugin-syntax-function-sent
Allow parsing of the `function.sent` meta property.
## Installation
```sh
$ npm install babel-plugin-syntax-function-sent
```
## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": ["syntax-function-sent"]
}
```
### Via CLI
```sh
$ babel --plugins syntax-function-sent script.js
```
### Via Node API
```javascript
require("babel-core").transform("code", {
plugins: ["syntax-function-sent"]
});
```

View File

@ -0,0 +1,17 @@
{
"name": "babel-plugin-syntax-function-sent",
"version": "6.1.18",
"description": "Allow parsing of the function.sent meta property",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-function-sent",
"license": "MIT",
"main": "lib/index.js",
"keywords": [
"babel-plugin"
],
"dependencies": {
"babel-runtime": "^5.0.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.1.18"
}
}

View File

@ -0,0 +1,7 @@
export default function () {
return {
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push("functionSent");
}
};
}