move doDefaultExportInterop to default module formatter
This commit is contained in:
parent
b449dbe891
commit
59e3eb2bd1
@ -27,6 +27,10 @@ function DefaultFormatter(file) {
|
|||||||
this.remapAssignments();
|
this.remapAssignments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DefaultFormatter.prototype.doDefaultExportInterop = function (node) {
|
||||||
|
return node.default && !this.noInteropRequire && !this.hasNonDefaultExports;
|
||||||
|
};
|
||||||
|
|
||||||
DefaultFormatter.prototype.bumpImportOccurences = function (node) {
|
DefaultFormatter.prototype.bumpImportOccurences = function (node) {
|
||||||
var source = node.source.value;
|
var source = node.source.value;
|
||||||
var occurs = this.localImportOccurences;
|
var occurs = this.localImportOccurences;
|
||||||
|
|||||||
@ -60,10 +60,6 @@ CommonJSFormatter.prototype.importDeclaration = function (node, nodes) {
|
|||||||
}, true));
|
}, true));
|
||||||
};
|
};
|
||||||
|
|
||||||
CommonJSFormatter.prototype.doDefaultExportInterop = function (node) {
|
|
||||||
return node.default && !this.noInteropRequire && !this.hasNonDefaultExports;
|
|
||||||
};
|
|
||||||
|
|
||||||
CommonJSFormatter.prototype.exportDeclaration = function (node, nodes) {
|
CommonJSFormatter.prototype.exportDeclaration = function (node, nodes) {
|
||||||
if (this.doDefaultExportInterop(node)) {
|
if (this.doDefaultExportInterop(node)) {
|
||||||
var declar = node.declaration;
|
var declar = node.declaration;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user