babel-macros
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -109,7 +109,12 @@ 'use strict'; | ||
} | ||
var name = path.parent.id.name; | ||
var imports = path.parent.id.name ? [{ localName: path.parent.id.name, importedName: 'default' }] : path.parent.id.properties.map(function (property) { | ||
return { | ||
localName: property.value.name, | ||
importedName: property.key.name | ||
}; | ||
}); | ||
var source = path.node.arguments[0].value; | ||
applyMacros({ | ||
path, | ||
imports: [{ localName: name, importedName: 'default' }], | ||
imports, | ||
source, | ||
@@ -116,0 +121,0 @@ state, |
{ | ||
"name": "babel-macros", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Enables zero-config, importable babel plugins", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -16,3 +16,3 @@ <div align="center"> | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors) | ||
[![PRs Welcome][prs-badge]][prs] | ||
@@ -260,3 +260,3 @@ [![Donate][donate-badge]][donate] | ||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | | ||
| [<img src="https://avatars3.githubusercontent.com/u/1903016?v=4" width="100px;"/><br /><sub>Brian Pedersen</sub>](https://github.com/PiereDome)<br />[💻](https://github.com/kentcdodds/babel-macros/commits?author=PiereDome "Code") [📖](https://github.com/kentcdodds/babel-macros/commits?author=PiereDome "Documentation") | | ||
| [<img src="https://avatars3.githubusercontent.com/u/1903016?v=4" width="100px;"/><br /><sub>Brian Pedersen</sub>](https://github.com/PiereDome)<br />[💻](https://github.com/kentcdodds/babel-macros/commits?author=PiereDome "Code") [📖](https://github.com/kentcdodds/babel-macros/commits?author=PiereDome "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/4495237?v=4" width="100px;"/><br /><sub>Andrew Palm</sub>](https://github.com/apalm)<br />[💻](https://github.com/kentcdodds/babel-macros/commits?author=apalm "Code") | | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
@@ -263,0 +263,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23736
219