babel-macros
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -38,2 +38,3 @@ 'use strict'; | ||
function createMacro(macro) { | ||
macroWrapper.isBabelMacro = true; | ||
return macroWrapper; | ||
@@ -146,3 +147,3 @@ | ||
var macro = require(requirePath); | ||
if (macro.name !== 'macroWrapper') { | ||
if (!macro.isBabelMacro) { | ||
throw new Error( | ||
@@ -149,0 +150,0 @@ // eslint-disable-next-line prefer-template |
{ | ||
"name": "babel-macros", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Enables zero-config, importable babel plugins", | ||
@@ -13,2 +13,3 @@ "main": "dist/index.js", | ||
"validate": "kcd-scripts validate", | ||
"setup": "npm install && npm run validate -s", | ||
"precommit": "kcd-scripts precommit" | ||
@@ -30,7 +31,8 @@ }, | ||
"devDependencies": { | ||
"ast-pretty-print": "^2.0.0", | ||
"ast-pretty-print": "2.0.1", | ||
"babel-core": "^6.25.0", | ||
"babel-plugin-tester": "^4.0.0", | ||
"babylon": "6.17.4", | ||
"kcd-scripts": "0.3.4" | ||
"babylon": "6.18.0", | ||
"cpy": "6.0.0", | ||
"kcd-scripts": "0.27.0" | ||
}, | ||
@@ -45,2 +47,7 @@ "eslintConfig": { | ||
], | ||
"babel": { | ||
"presets": [ | ||
"./.babelrc.js" | ||
] | ||
}, | ||
"repository": { | ||
@@ -47,0 +54,0 @@ "type": "git", |
@@ -29,2 +29,4 @@ <div align="center"> | ||
Check out <a href="https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros" rel="nofollow">this guest post</a> on the Babel.js blog for a complete write up on the problem, motivation, and solution. | ||
Currently, each babel plugin in the babel ecosystem requires that you configure | ||
@@ -180,3 +182,3 @@ it individually. This is fine for things like language features, but can be | ||
This differs from the current situation with babel plugins where | ||
it's prohibitvely difficult to control the order plugins run in | ||
it's prohibitively difficult to control the order plugins run in | ||
a particular file. | ||
@@ -183,0 +185,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
20817
181
281
6