remove useless root variable in umd module formatter
This commit is contained in:
parent
e76462303e
commit
44966849f9
@ -43,6 +43,6 @@ UMDFormatter.prototype.transform = function (ast) {
|
|||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
var call = b.callExpression(runner, [b.thisExpression(), factory]);
|
var call = b.callExpression(runner, [factory]);
|
||||||
program.body = [b.expressionStatement(call)];
|
program.body = [b.expressionStatement(call)];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(AMD_ARGUMENTS, factory);
|
define(AMD_ARGUMENTS, factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports"], factory);
|
define(["exports"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports);
|
factory(exports);
|
||||||
}
|
}
|
||||||
})(this, function (exports) {
|
})(function (exports) {
|
||||||
exports.default = 42;
|
exports.default = 42;
|
||||||
exports.default = {};
|
exports.default = {};
|
||||||
exports.default = [];
|
exports.default = [];
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports", "foo"], factory);
|
define(["exports", "foo"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports, require("foo"));
|
factory(exports, require("foo"));
|
||||||
}
|
}
|
||||||
})(this, function (exports, _foo) {
|
})(function (exports, _foo) {
|
||||||
(function(obj) {
|
(function(obj) {
|
||||||
for (var i in obj) {
|
for (var i in obj) {
|
||||||
exports[i] = obj[i];
|
exports[i] = obj[i];
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports"], factory);
|
define(["exports"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports);
|
factory(exports);
|
||||||
}
|
}
|
||||||
})(this, function (exports) {
|
})(function (exports) {
|
||||||
exports.foo = foo;
|
exports.foo = foo;
|
||||||
exports.foo = foo;
|
exports.foo = foo;
|
||||||
exports.bar = bar;
|
exports.bar = bar;
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports"], factory);
|
define(["exports"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports);
|
factory(exports);
|
||||||
}
|
}
|
||||||
})(this, function (exports) {
|
})(function (exports) {
|
||||||
exports.foo7 = foo7;
|
exports.foo7 = foo7;
|
||||||
var foo = 1;
|
var foo = 1;
|
||||||
exports.foo = foo;
|
exports.foo = foo;
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports", "./evens"], factory);
|
define(["exports", "./evens"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports, require("./evens"));
|
factory(exports, require("./evens"));
|
||||||
}
|
}
|
||||||
})(this, function (exports, _evens) {
|
})(function (exports, _evens) {
|
||||||
exports.nextOdd = nextOdd;
|
exports.nextOdd = nextOdd;
|
||||||
var isEven = _evens.isEven;
|
var isEven = _evens.isEven;
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports", "foo"], factory);
|
define(["exports", "foo"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports, require("foo"));
|
factory(exports, require("foo"));
|
||||||
}
|
}
|
||||||
})(this, function (exports, _foo) {
|
})(function (exports, _foo) {
|
||||||
var foo = _foo.default;
|
var foo = _foo.default;
|
||||||
var foo = _foo.default;
|
var foo = _foo.default;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports", "foo"], factory);
|
define(["exports", "foo"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports, require("foo"));
|
factory(exports, require("foo"));
|
||||||
}
|
}
|
||||||
})(this, function (exports, _foo) {
|
})(function (exports, _foo) {
|
||||||
var foo = _foo;
|
var foo = _foo;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports", "foo"], factory);
|
define(["exports", "foo"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports, require("foo"));
|
factory(exports, require("foo"));
|
||||||
}
|
}
|
||||||
})(this, function (exports, _foo) {
|
})(function (exports, _foo) {
|
||||||
var foo = _foo.default;
|
var foo = _foo.default;
|
||||||
var xyz = _foo.baz;
|
var xyz = _foo.baz;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports", "foo"], factory);
|
define(["exports", "foo"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports, require("foo"));
|
factory(exports, require("foo"));
|
||||||
}
|
}
|
||||||
})(this, function (exports, _foo) {
|
})(function (exports, _foo) {
|
||||||
var bar = _foo.bar;
|
var bar = _foo.bar;
|
||||||
var bar = _foo.bar;
|
var bar = _foo.bar;
|
||||||
var baz = _foo.baz;
|
var baz = _foo.baz;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], factory);
|
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar"));
|
factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar"));
|
||||||
}
|
}
|
||||||
})(this, function (exports, _foo, _fooBar, _directoryFooBar) {
|
})(function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(function (root, factory) {
|
(function (factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], factory);
|
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], factory);
|
||||||
} else if (typeof exports !== "undefined") {
|
} else if (typeof exports !== "undefined") {
|
||||||
factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar"));
|
factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar"));
|
||||||
}
|
}
|
||||||
})(this, function (exports, _foo, _fooBar, _directoryFooBar) {
|
})(function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||||
var foo = _foo.default;
|
var foo = _foo.default;
|
||||||
var foo = _foo;
|
var foo = _foo;
|
||||||
var bar = _foo.bar;
|
var bar = _foo.bar;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user