Skip to content

Commit

Permalink
add syntax plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Sep 13, 2022
1 parent 16b0524 commit e023050
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/babel-plugin-syntax-import-reflection/README.md
@@ -0,0 +1,19 @@
# @babel/plugin-syntax-import-reflection

> Allow parsing of the reflection attributes in the import statement
See our website [@babel/plugin-syntax-import-reflection](https://babeljs.io/docs/en/babel-plugin-syntax-import-reflection) for more information.

## Install

Using npm:

```sh
npm install --save-dev @babel/plugin-syntax-import-reflection
```

or using yarn:

```sh
yarn add @babel/plugin-syntax-import-reflection --dev
```
50 changes: 50 additions & 0 deletions packages/babel-plugin-syntax-import-reflection/package.json
@@ -0,0 +1,50 @@
{
"name": "@babel/plugin-syntax-import-reflection",
"version": "7.18.6",
"description": "Allow parsing of the reflection attributes in the import statement",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-plugin-syntax-import-reflection"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"keywords": [
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "workspace:^"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
],
"USE_ESM": [
{
"type": "module"
},
null
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
},
"type": "commonjs"
}
13 changes: 13 additions & 0 deletions packages/babel-plugin-syntax-import-reflection/src/index.ts
@@ -0,0 +1,13 @@
import { declare } from "@babel/helper-plugin-utils";

export default declare(api => {
api.assertVersion(7);

return {
name: "syntax-import-reflection",

manipulateOptions(_, parserOpts) {
parserOpts.plugins.push("importReflection");
},
};
});
4 changes: 4 additions & 0 deletions tsconfig.json
Expand Up @@ -81,6 +81,7 @@
"./packages/babel-plugin-syntax-function-bind/src/**/*.ts",
"./packages/babel-plugin-syntax-function-sent/src/**/*.ts",
"./packages/babel-plugin-syntax-import-assertions/src/**/*.ts",
"./packages/babel-plugin-syntax-import-reflection/src/**/*.ts",
"./packages/babel-plugin-syntax-jsx/src/**/*.ts",
"./packages/babel-plugin-syntax-module-blocks/src/**/*.ts",
"./packages/babel-plugin-syntax-partial-application/src/**/*.ts",
Expand Down Expand Up @@ -407,6 +408,9 @@
"@babel/plugin-syntax-import-assertions": [
"./packages/babel-plugin-syntax-import-assertions/src"
],
"@babel/plugin-syntax-import-reflection": [
"./packages/babel-plugin-syntax-import-reflection/src"
],
"@babel/plugin-syntax-jsx": [
"./packages/babel-plugin-syntax-jsx/src"
],
Expand Down

0 comments on commit e023050

Please sign in to comment.