make use strict directive stateless - fixes #828
This commit is contained in:
parent
35bd510930
commit
7927aa2e18
@ -1,21 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
var t = require("../../types");
|
||||
|
||||
exports.has = function (node) {
|
||||
var first = node.body[0];
|
||||
return t.isExpressionStatement(first) && t.isLiteral(first.expression, { value: "use strict" });
|
||||
};
|
||||
|
||||
exports.wrap = function (node, callback) {
|
||||
var useStrictNode;
|
||||
if (exports.has(node)) {
|
||||
useStrictNode = node.body.shift();
|
||||
}
|
||||
|
||||
callback();
|
||||
|
||||
if (useStrictNode) {
|
||||
node.body.unshift(useStrictNode);
|
||||
}
|
||||
};
|
||||
@ -4,12 +4,11 @@ module.exports = SystemFormatter;
|
||||
|
||||
var DefaultFormatter = require("./_default");
|
||||
var AMDFormatter = require("./amd");
|
||||
var useStrict = require("../helpers/use-strict");
|
||||
var util = require("../../util");
|
||||
var t = require("../../types");
|
||||
var last = require("lodash/array/last");
|
||||
var each = require("lodash/collection/each");
|
||||
var map = require("lodash/collection/map");
|
||||
var t = require("../../types");
|
||||
|
||||
function SystemFormatter(file) {
|
||||
this.exportIdentifier = file.scope.generateUidIdentifier("export");
|
||||
@ -193,9 +192,5 @@ SystemFormatter.prototype.transform = function (program) {
|
||||
|
||||
handlerBody.push(returnStatement);
|
||||
|
||||
if (useStrict.has(block)) {
|
||||
handlerBody.unshift(block.body.shift());
|
||||
}
|
||||
|
||||
program.body = [runner];
|
||||
};
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
var useStrict = require("../../helpers/use-strict");
|
||||
var groupBy = require("lodash/collection/groupBy");
|
||||
var flatten = require("lodash/array/flatten");
|
||||
var values = require("lodash/object/values");
|
||||
var groupBy = require("lodash/collection/groupBy");
|
||||
var flatten = require("lodash/array/flatten");
|
||||
var values = require("lodash/object/values");
|
||||
|
||||
// Priority:
|
||||
//
|
||||
@ -22,15 +21,13 @@ exports.Program = {
|
||||
}
|
||||
if (!hasChange) return;
|
||||
|
||||
useStrict.wrap(node, function () {
|
||||
var nodePriorities = groupBy(node.body, function (bodyNode) {
|
||||
var priority = bodyNode._blockHoist;
|
||||
if (priority == null) priority = 1;
|
||||
if (priority === true) priority = 2;
|
||||
return priority;
|
||||
});
|
||||
|
||||
node.body = flatten(values(nodePriorities).reverse());
|
||||
var nodePriorities = groupBy(node.body, function (bodyNode) {
|
||||
var priority = bodyNode._blockHoist;
|
||||
if (priority == null) priority = 1;
|
||||
if (priority === true) priority = 2;
|
||||
return priority;
|
||||
});
|
||||
|
||||
node.body = flatten(values(nodePriorities).reverse());
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var useStrict = require("../../helpers/use-strict");
|
||||
var t = require("../../../types");
|
||||
var t = require("../../../types");
|
||||
|
||||
exports.secondPass = true;
|
||||
|
||||
@ -12,25 +11,23 @@ exports.Program = function (node, parent, scope, file) {
|
||||
var kinds = {};
|
||||
var kind;
|
||||
|
||||
useStrict.wrap(node, function () {
|
||||
for (var i in node._declarations) {
|
||||
var declar = node._declarations[i];
|
||||
for (var i in node._declarations) {
|
||||
var declar = node._declarations[i];
|
||||
|
||||
kind = declar.kind || "var";
|
||||
var declarNode = t.variableDeclarator(declar.id, declar.init);
|
||||
kind = declar.kind || "var";
|
||||
var declarNode = t.variableDeclarator(declar.id, declar.init);
|
||||
|
||||
if (declar.init) {
|
||||
node.body.unshift(file.attachAuxiliaryComment(t.variableDeclaration(kind, [declarNode])));
|
||||
} else {
|
||||
kinds[kind] = kinds[kind] || [];
|
||||
kinds[kind].push(declarNode);
|
||||
}
|
||||
if (declar.init) {
|
||||
node.body.unshift(file.attachAuxiliaryComment(t.variableDeclaration(kind, [declarNode])));
|
||||
} else {
|
||||
kinds[kind] = kinds[kind] || [];
|
||||
kinds[kind].push(declarNode);
|
||||
}
|
||||
}
|
||||
|
||||
for (kind in kinds) {
|
||||
node.body.unshift(file.attachAuxiliaryComment(t.variableDeclaration(kind, kinds[kind])));
|
||||
}
|
||||
});
|
||||
for (kind in kinds) {
|
||||
node.body.unshift(file.attachAuxiliaryComment(t.variableDeclaration(kind, kinds[kind])));
|
||||
}
|
||||
|
||||
node._declarations = null;
|
||||
};
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
var useStrict = require("../../helpers/use-strict");
|
||||
|
||||
exports.Program = function (program, parent, scope, file) {
|
||||
if (!file.transformers["es6.modules"].canRun()) return;
|
||||
|
||||
useStrict.wrap(program, function () {
|
||||
program.body = file.dynamicImports.concat(program.body);
|
||||
});
|
||||
program.body = file.dynamicImports.concat(program.body);
|
||||
|
||||
if (file.moduleFormatter.transform) {
|
||||
file.moduleFormatter.transform(program);
|
||||
|
||||
@ -1,15 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
var useStrict = require("../../helpers/use-strict");
|
||||
var messages = require("../../../messages");
|
||||
var t = require("../../../types");
|
||||
var messages = require("../../../messages");
|
||||
var t = require("../../../types");
|
||||
|
||||
exports.Program = function (program) {
|
||||
if (!useStrict.has(program)) {
|
||||
program.body.unshift(t.expressionStatement(t.literal("use strict")));
|
||||
exports.Program = {
|
||||
enter: function (program, parent, scope, file) {
|
||||
var first = program.body[0];
|
||||
if (t.isExpressionStatement(first) && t.isLiteral(first.expression, { value: "use strict" })) {
|
||||
program.body.shift();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.post = function (file) {
|
||||
file.ast.program.body.unshift(t.expressionStatement(t.literal("use strict")));
|
||||
};
|
||||
|
||||
exports.FunctionDeclaration =
|
||||
exports.FunctionExpression = function () {
|
||||
this.skip();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports", "module"], function (exports, module) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "module"], function (exports, module) {
|
||||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
|
||||
|
||||
module.exports = foo;
|
||||
@ -23,4 +23,4 @@ define(["exports", "module"], function (exports, module) {
|
||||
};
|
||||
|
||||
module.exports = Foo;
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
|
||||
|
||||
var _defaults = function (obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; };
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports"], function (exports) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports"], function (exports) {
|
||||
exports.foo = foo;
|
||||
exports.foo = foo;
|
||||
exports.bar = bar;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports"], function (exports) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports"], function (exports) {
|
||||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
|
||||
|
||||
exports.foo7 = foo7;
|
||||
@ -21,4 +21,4 @@ define(["exports"], function (exports) {
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -1,3 +1,3 @@
|
||||
define("my custom module name", ["exports"], function (exports) {
|
||||
"use strict";
|
||||
});
|
||||
"use strict";
|
||||
|
||||
define("my custom module name", ["exports"], function (exports) {});
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports", "./evens"], function (exports, _evens) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "./evens"], function (exports, _evens) {
|
||||
exports.nextOdd = nextOdd;
|
||||
var isEven = _evens.isEven;
|
||||
function nextOdd(n) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
var foo = _foo;
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "foo"], function (exports, _foo) {
|
||||
var bar = _foo.bar;
|
||||
var bar2 = _foo.bar2;
|
||||
var baz = _foo.baz;
|
||||
var baz2 = _foo.bar;
|
||||
var baz3 = _foo.bar;
|
||||
var xyz = _foo.xyz;
|
||||
});
|
||||
});
|
||||
@ -1,3 +1,3 @@
|
||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
"use strict";
|
||||
});
|
||||
"use strict";
|
||||
|
||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], function (exports, _foo, _fooBar, _directoryFooBar) {});
|
||||
@ -1,5 +1,5 @@
|
||||
define("es6-modules-amd/module-name/expected", ["exports"], function (exports) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define("es6-modules-amd/module-name/expected", ["exports"], function (exports) {
|
||||
foobar();
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
define(["exports"], function (exports) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports"], function (exports) {
|
||||
var test = exports.test = 2;
|
||||
test = exports.test = 5;
|
||||
test = exports.test += 1;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
System.register([], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register([], function (_export) {
|
||||
var _classCallCheck, _default, Foo;
|
||||
|
||||
_export("default", foo);
|
||||
@ -34,4 +34,4 @@ System.register([], function (_export) {
|
||||
_export("default", Foo);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["foo"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["foo"], function (_export) {
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
for (var _key in _foo) {
|
||||
@ -23,4 +23,4 @@ System.register(["foo"], function (_export) {
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register([], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register([], function (_export) {
|
||||
var generator = regeneratorRuntime.mark(function generator() {
|
||||
return regeneratorRuntime.wrap(function generator$(context$1$0) {
|
||||
while (1) switch (context$1$0.prev = context$1$0.next) {
|
||||
@ -21,4 +21,4 @@ System.register([], function (_export) {
|
||||
setters: [],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register([], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register([], function (_export) {
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
@ -19,4 +19,4 @@ System.register([], function (_export) {
|
||||
_export("bar", bar);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register([], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register([], function (_export) {
|
||||
var _classCallCheck, foo, foo2, foo3, foo4, foo5, foo6, foo8;
|
||||
|
||||
_export("foo7", foo7);
|
||||
@ -24,4 +24,4 @@ System.register([], function (_export) {
|
||||
_export("foo3", foo3 = 5);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,8 +1,8 @@
|
||||
System.register("my custom module name", [], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register("my custom module name", [], function (_export) {
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["./evens"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["./evens"], function (_export) {
|
||||
var isEven, p, isOdd;
|
||||
|
||||
_export("nextOdd", nextOdd);
|
||||
@ -22,4 +22,4 @@ System.register(["./evens"], function (_export) {
|
||||
})(isEven));
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["foo"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["foo"], function (_export) {
|
||||
var foo, foo2;
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
@ -9,4 +9,4 @@ System.register(["foo"], function (_export) {
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["foo"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["foo"], function (_export) {
|
||||
var foo;
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["foo"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["foo"], function (_export) {
|
||||
var foo, xyz;
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["foo"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["foo"], function (_export) {
|
||||
var bar, bar2, baz, baz2, baz3, xyz;
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
@ -13,4 +13,4 @@ System.register(["foo"], function (_export) {
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export) {
|
||||
return {
|
||||
setters: [function (_foo) {}, function (_fooBar) {}, function (_directoryFooBar) {}],
|
||||
execute: function () {}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export) {
|
||||
var foo, foo2, bar, bar2, test2;
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
@ -17,4 +17,4 @@ System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export) {
|
||||
_export("default", test);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register([], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register([], function (_export) {
|
||||
var test;
|
||||
return {
|
||||
setters: [],
|
||||
@ -17,4 +17,4 @@ System.register([], function (_export) {
|
||||
})();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "module"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports, module);
|
||||
}
|
||||
})(function (exports, module) {
|
||||
"use strict";
|
||||
|
||||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
|
||||
|
||||
module.exports = foo;
|
||||
@ -29,4 +29,4 @@
|
||||
};
|
||||
|
||||
module.exports = Foo;
|
||||
});
|
||||
});
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports, require("foo"));
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
|
||||
|
||||
var _defaults = function (obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; };
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports);
|
||||
}
|
||||
})(function (exports) {
|
||||
"use strict";
|
||||
|
||||
exports.foo = foo;
|
||||
exports.foo = foo;
|
||||
exports.bar = bar;
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports);
|
||||
}
|
||||
})(function (exports) {
|
||||
"use strict";
|
||||
|
||||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
|
||||
|
||||
exports.foo7 = foo7;
|
||||
@ -27,4 +27,4 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -1,9 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("my custom module name", ["exports"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports);
|
||||
}
|
||||
})(function (exports) {
|
||||
"use strict";
|
||||
});
|
||||
})(function (exports) {});
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "./evens"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports, require("./evens"));
|
||||
}
|
||||
})(function (exports, _evens) {
|
||||
"use strict";
|
||||
|
||||
exports.nextOdd = nextOdd;
|
||||
var isEven = _evens.isEven;
|
||||
function nextOdd(n) {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports, require("foo"));
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
@ -5,7 +7,5 @@
|
||||
factory(exports, require("foo"));
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var foo = _foo;
|
||||
});
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports, require("foo"));
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo"], factory);
|
||||
@ -5,12 +7,10 @@
|
||||
factory(exports, require("foo"));
|
||||
}
|
||||
})(function (exports, _foo) {
|
||||
"use strict";
|
||||
|
||||
var bar = _foo.bar;
|
||||
var bar2 = _foo.bar2;
|
||||
var baz = _foo.baz;
|
||||
var baz2 = _foo.bar;
|
||||
var baz3 = _foo.bar;
|
||||
var xyz = _foo.xyz;
|
||||
});
|
||||
});
|
||||
@ -1,9 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar"));
|
||||
}
|
||||
})(function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
"use strict";
|
||||
});
|
||||
})(function (exports, _foo, _fooBar, _directoryFooBar) {});
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("es6-modules-umd/module-name/expected", ["exports"], factory);
|
||||
@ -5,7 +7,5 @@
|
||||
factory(exports);
|
||||
}
|
||||
})(function (exports) {
|
||||
"use strict";
|
||||
|
||||
foobar();
|
||||
});
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo", "foo-bar", "./directory/foo-bar"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar"));
|
||||
}
|
||||
})(function (exports, _foo, _fooBar, _directoryFooBar) {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
@ -21,4 +21,4 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports);
|
||||
}
|
||||
})(function (exports) {
|
||||
"use strict";
|
||||
|
||||
var test = exports.test = 2;
|
||||
test = exports.test = 5;
|
||||
test = exports.test += 1;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
define(["exports", "foo", "babel-runtime/helpers"], function (exports, _foo, _babelRuntimeHelpers) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
define(["exports", "foo", "babel-runtime/helpers"], function (exports, _foo, _babelRuntimeHelpers) {
|
||||
var _babelHelpers = _babelRuntimeHelpers["default"];
|
||||
|
||||
var foo = _babelHelpers.interopRequire(_foo);
|
||||
});
|
||||
});
|
||||
@ -1,6 +1,6 @@
|
||||
System.register(["babel-runtime/helpers"], function (_export) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
System.register(["babel-runtime/helpers"], function (_export) {
|
||||
var _babelHelpers;
|
||||
|
||||
return {
|
||||
@ -11,4 +11,4 @@ System.register(["babel-runtime/helpers"], function (_export) {
|
||||
foo.apply(undefined, _babelHelpers.toConsumableArray(bar));
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo", "babel-runtime/helpers"], factory);
|
||||
@ -5,8 +7,6 @@
|
||||
factory(exports, require("foo"), require("babel-runtime/helpers"));
|
||||
}
|
||||
})(function (exports, _foo, _babelRuntimeHelpers) {
|
||||
"use strict";
|
||||
|
||||
var _babelHelpers = _babelRuntimeHelpers["default"];
|
||||
|
||||
var foo = _babelHelpers.interopRequire(_foo);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user