Split exportExtensions into exportDefault and exportNamespace plugins… (#6920)
* Split exportExtensions into two plugins in babylon * rename proposal-export-default to proposal-export-default-from * rename proposal-export-namespace to proposal-export-namespace-from
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
src
|
||||
test
|
||||
*.log
|
||||
35
packages/babel-plugin-syntax-export-namespace-from/README.md
Normal file
35
packages/babel-plugin-syntax-export-namespace-from/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# @babel/plugin-syntax-export-namespace-from
|
||||
|
||||
> Allow parsing of `export * as namespace from`.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-syntax-export-namespace-from
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["@babel/plugin-syntax-export-namespace-from"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
babel --plugins @babel/plugin-syntax-export-namespace-from script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("@babel/core").transform("code", {
|
||||
plugins: ["@babel/plugin-syntax-export-namespace-from"]
|
||||
});
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-export-namespace-from",
|
||||
"version": "7.0.0-beta.32",
|
||||
"description": "Allow parsing of export namespace from",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-export-namespace-from",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"@babel/core": "7.0.0-beta.32"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0-beta.32"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default function() {
|
||||
return {
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("exportNamespaceFrom");
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user