Allow plugins to assert that a specific babel version has loaded the plugin. (#7450)
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "7.0.0-beta.40"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "7.0.0-beta.40"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { declare } from "@babel/helper-plugin-utils";
|
||||
import { types as t } from "@babel/core";
|
||||
|
||||
export default function() {
|
||||
export default declare(api => {
|
||||
api.assertVersion(7);
|
||||
|
||||
return {
|
||||
visitor: {
|
||||
BinaryExpression(path) {
|
||||
@@ -25,4 +28,4 @@ export default function() {
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user