Skip to content

Commit f04967a

Browse files
vicbvojtajina
authored andcommitted
chore(traceur): update to 0.0.79
fixes angular#8
1 parent 6f30312 commit f04967a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"run-sequence": "^0.3.6",
2525
"systemjs": "^0.9.1",
2626
"through2": "^0.6.1",
27-
"traceur": "0.0.74",
27+
"traceur": "0.0.79",
2828
"which": "~1",
2929
"zone.js": "0.3.0"
3030
},

tools/transpiler/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ var SELF_COMPILE_OPTIONS = {
1515
};
1616

1717
var needsReload = true;
18+
var oldSystemGet = System.get;
1819

1920
exports.reloadSources = function() {
2021
needsReload = true;
@@ -63,6 +64,16 @@ function reloadCompiler() {
6364
glob.sync(__dirname + '/src/**/*.js').forEach(function(fileName) {
6465
loadModule(fileName, true);
6566
});
67+
68+
// Traceur modules are register with the ".js" extension but we don't want
69+
// to add it to all the import statements.
70+
System.get = function get(normalizedName) {
71+
var m = oldSystemGet.call(this, normalizedName);
72+
if (!m && normalizedName.indexOf('traceur') == 0) {
73+
m = oldSystemGet.call(this, normalizedName + '.js');
74+
}
75+
return m;
76+
};
6677
}
6778

6879
function loadModule(filepath, transpile) {
@@ -94,4 +105,4 @@ function extend(source, props) {
94105
res[prop] = props[prop];
95106
}
96107
return res;
97-
}
108+
}

0 commit comments

Comments
 (0)