Merge branch 'feat-system-module-rewrite' of https://github.com/douglasduteil/6to5 into 2.0.0
Conflicts: lib/6to5/transformation/modules/system.js test/fixtures/transformation/es6-modules-system/exports-from/expected.js
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
System.register("actual", ["foo"], function (_export) {
|
||||
"use strict";
|
||||
|
||||
var __moduleName = "actual";
|
||||
|
||||
var _localExports = ['foo', 'bar', 'default'];
|
||||
|
||||
return {
|
||||
setters: [
|
||||
function(m) {
|
||||
_export("foo", m.foo);
|
||||
|
||||
_export("foo", m.foo);
|
||||
|
||||
_export("bar", m.bar);
|
||||
|
||||
_export("bar", m.foo);
|
||||
|
||||
_export("default", m.foo);
|
||||
|
||||
_export("default", m.foo);
|
||||
|
||||
_export("bar", m.bar);
|
||||
|
||||
for (var p in m) {
|
||||
if (_localExports.indexOf(i) == -1)
|
||||
_export(p, m[p]);
|
||||
}
|
||||
}
|
||||
],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
@@ -5,10 +5,8 @@ System.register("actual", [], function (_export) {
|
||||
|
||||
function _anonymous() {}
|
||||
var _anonymous2;
|
||||
|
||||
function foo() {}
|
||||
var Foo;
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
@@ -1,11 +1,16 @@
|
||||
System.register("actual", [], function (_export) {
|
||||
System.register("actual", ["foo"], function (_export) {
|
||||
"use strict";
|
||||
|
||||
var __moduleName = "actual";
|
||||
|
||||
return {
|
||||
setters: [
|
||||
function(m) {
|
||||
setters: [function (m) {
|
||||
(function (obj) {
|
||||
for (var i in obj) {
|
||||
_export(i, obj[i]);
|
||||
}
|
||||
})(m);
|
||||
|
||||
_export("foo", m.foo);
|
||||
|
||||
_export("foo", m.foo);
|
||||
@@ -20,7 +25,6 @@ System.register("actual", [], function (_export) {
|
||||
|
||||
_export("bar", m.bar);
|
||||
}],
|
||||
execute: function () {
|
||||
}
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
24
test/fixtures/transformation/es6-modules-system/exports-named/expected.js
vendored
Normal file
24
test/fixtures/transformation/es6-modules-system/exports-named/expected.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
System.register("actual", [], function (_export) {
|
||||
"use strict";
|
||||
|
||||
var __moduleName = "actual";
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
_export("foo", foo);
|
||||
|
||||
_export("foo", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
|
||||
_export("bar", foo);
|
||||
|
||||
_export("default", foo);
|
||||
|
||||
_export("default", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -13,7 +13,6 @@ System.register("actual", [], function (_export) {
|
||||
_export("foo7", foo7);
|
||||
|
||||
var foo8;
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
Reference in New Issue
Block a user