Parse JS Module Blocks proposal (#12469)
This commit is contained in:
3
packages/babel-plugin-syntax-module-blocks/.npmignore
Normal file
3
packages/babel-plugin-syntax-module-blocks/.npmignore
Normal file
@@ -0,0 +1,3 @@
|
||||
src
|
||||
test
|
||||
*.log
|
||||
19
packages/babel-plugin-syntax-module-blocks/README.md
Normal file
19
packages/babel-plugin-syntax-module-blocks/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# @babel/plugin-syntax-module-blocks
|
||||
|
||||
> Allow parsing of module blocks
|
||||
|
||||
See our website [@babel/plugin-syntax-module-blocks](https://babeljs.io/docs/en/babel-plugin-syntax-module-blocks) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-syntax-module-blocks
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-syntax-module-blocks --dev
|
||||
```
|
||||
27
packages/babel-plugin-syntax-module-blocks/package.json
Normal file
27
packages/babel-plugin-syntax-module-blocks/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-module-blocks",
|
||||
"version": "7.11.0",
|
||||
"description": "Allow parsing of JS Module Blocks",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-plugin-syntax-module-blocks"
|
||||
},
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"exports": {
|
||||
".": "./lib/index.js"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "workspace:^7.10.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
}
|
||||
13
packages/babel-plugin-syntax-module-blocks/src/index.js
Normal file
13
packages/babel-plugin-syntax-module-blocks/src/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { declare } from "@babel/helper-plugin-utils";
|
||||
|
||||
export default declare(api => {
|
||||
api.assertVersion(7);
|
||||
|
||||
return {
|
||||
name: "syntax-module-blocks",
|
||||
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("moduleBlocks");
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user