Use peerDep rather than plugin param for common APIs.

This commit is contained in:
Logan Smyth
2017-10-31 15:00:13 -07:00
parent 7dbed2170e
commit b19b66d94b
79 changed files with 141 additions and 115 deletions

View File

@@ -6,8 +6,7 @@
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-hoist-variables": "7.0.0-beta.31",
"@babel/template": "7.0.0-beta.31"
"@babel/helper-hoist-variables": "7.0.0-beta.31"
},
"keywords": [
"babel-plugin"

View File

@@ -1,5 +1,5 @@
import hoistVariables from "@babel/helper-hoist-variables";
import template from "@babel/template";
import { template, types as t } from "@babel/core";
const buildTemplate = template(`
SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {
@@ -22,7 +22,7 @@ const buildExportAll = template(`
const TYPE_IMPORT = "Import";
export default function({ types: t }, options) {
export default function(api, options) {
const { systemGlobal = "System" } = options;
const IGNORE_REASSIGNMENT_SYMBOL = Symbol();