feat(system-module): rewrite
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
System.register("actual", [], function (_export) {
|
||||
"use strict";
|
||||
|
||||
var __moduleName = "actual";
|
||||
|
||||
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);
|
||||
}],
|
||||
execute: function () {
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -5,10 +5,8 @@ System.register("actual", [], function (_export) {
|
||||
|
||||
function _anonymous() {}
|
||||
var _anonymous2;
|
||||
|
||||
function foo() {}
|
||||
var Foo;
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
@@ -3,11 +3,14 @@ System.register("actual", ["foo"], function (_export) {
|
||||
|
||||
var __moduleName = "actual";
|
||||
|
||||
var _localExports = ['foo', 'bar', 'default'];
|
||||
|
||||
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);
|
||||
@@ -21,14 +24,7 @@ System.register("actual", ["foo"], function (_export) {
|
||||
_export("default", m.foo);
|
||||
|
||||
_export("bar", m.bar);
|
||||
|
||||
for (var p in m) {
|
||||
if (_localExports.indexOf(i) == -1)
|
||||
_export(p, m[p]);
|
||||
}
|
||||
}
|
||||
],
|
||||
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