New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorators 2 Transform [WIP] #6107

Closed
wants to merge 23 commits into
base: master
from
Commits
Jump to file or symbol
Failed to load files and symbols.
+58 −0
Diff settings

Always

Just for now

Next

Add syntax plugin for decorators2

  • Loading branch information...
peey committed Jul 21, 2017
commit 57cdfaf1a196b02f293f3ffb754529880c9fcd2e
@@ -0,0 +1,3 @@
src
test
*.log
@@ -0,0 +1,35 @@
# babel-plugin-syntax-decorators-2
> Updated parsing of decorators.
## Installation
```sh
npm install --save-dev babel-plugin-syntax-decorators-2
```
## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": ["syntax-decorators-2"]
}
```
### Via CLI
```sh
babel --plugins syntax-decorators-2 script.js
```
### Via Node API
```javascript
require("babel-core").transform("code", {
plugins: ["syntax-decorators-2"]
});
```
@@ -0,0 +1,13 @@
{
"name": "babel-plugin-syntax-decorators-2",
"version": "7.0.0-alpha.15",
"description": "Updated parsing of decorators",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-decorators-2",
"license": "MIT",
"main": "lib/index.js",
"keywords": [
"babel-plugin"
],
"dependencies": {},
"devDependencies": {}
}
@@ -0,0 +1,7 @@
export default function() {
return {
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push("decorators2");
},
};
}
ProTip! Use n and p to navigate between commits in a pull request.