Parse JS Module Blocks proposal (#12469)

This commit is contained in:
Sosuke Suzuki
2021-02-22 04:08:20 +09:00
committed by GitHub
parent e4588bed22
commit 9c567baa9b
64 changed files with 1704 additions and 32 deletions

View File

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

View 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
```

View 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"
}
}

View 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");
},
};
});