diff --git a/packages/babel-plugin-syntax-module-string-names/.npmignore b/packages/babel-plugin-syntax-module-string-names/.npmignore new file mode 100644 index 0000000..2b1fceb --- /dev/null +++ b/packages/babel-plugin-syntax-module-string-names/.npmignore @@ -0,0 +1,3 @@ +*.log +src +test diff --git a/packages/babel-plugin-syntax-module-string-names/LICENSE b/packages/babel-plugin-syntax-module-string-names/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/packages/babel-plugin-syntax-module-string-names/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/babel-plugin-syntax-module-string-names/README.md b/packages/babel-plugin-syntax-module-string-names/README.md new file mode 100644 index 0000000..9144d06 --- /dev/null +++ b/packages/babel-plugin-syntax-module-string-names/README.md @@ -0,0 +1,19 @@ +# @babel/plugin-syntax-module-string-names + +> Allow parsing `import { 'any unicode' as bar }` and `export { foo as 'any unicode' }` + +See our website [@babel/plugin-syntax-module-string-names](https://babeljs.io/docs/en/babel-plugin-syntax-module-string-names) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/plugin-syntax-module-string-names +``` + +or using yarn: + +```sh +yarn add @babel/plugin-syntax-module-string-names --dev +``` diff --git a/packages/babel-plugin-syntax-module-string-names/package.json b/packages/babel-plugin-syntax-module-string-names/package.json new file mode 100644 index 0000000..51b66d4 --- /dev/null +++ b/packages/babel-plugin-syntax-module-string-names/package.json @@ -0,0 +1,29 @@ +{ + "name": "@babel/plugin-syntax-module-string-names", + "version": "7.12.13", + "description": "Allow parsing `import { 'any unicode' as bar }` and `export { foo as 'any unicode' }`", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-plugin-syntax-module-string-names" + }, + "homepage": "https://babel.dev/docs/en/next/babel-plugin-syntax-logical-assignment-operators", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "exports": "./lib/index.js", + "keywords": [ + "babel-plugin" + ], + "dependencies": { + "@babel/helper-plugin-utils": "workspace:^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + }, + "devDependencies": { + "@babel/core": "workspace:*" + } +} diff --git a/packages/babel-plugin-syntax-module-string-names/src/index.js b/packages/babel-plugin-syntax-module-string-names/src/index.js new file mode 100644 index 0000000..25cf00d --- /dev/null +++ b/packages/babel-plugin-syntax-module-string-names/src/index.js @@ -0,0 +1,13 @@ +import { declare } from "@babel/helper-plugin-utils"; + +export default declare(api => { + api.assertVersion(7); + + return { + name: "syntax-module-string-names", + + manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("moduleStringNames"); + }, + }; +});