parent
6f303121c6
commit
f04967ad37
|
@ -24,7 +24,7 @@
|
||||||
"run-sequence": "^0.3.6",
|
"run-sequence": "^0.3.6",
|
||||||
"systemjs": "^0.9.1",
|
"systemjs": "^0.9.1",
|
||||||
"through2": "^0.6.1",
|
"through2": "^0.6.1",
|
||||||
"traceur": "0.0.74",
|
"traceur": "0.0.79",
|
||||||
"which": "~1",
|
"which": "~1",
|
||||||
"zone.js": "0.3.0"
|
"zone.js": "0.3.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,6 +15,7 @@ var SELF_COMPILE_OPTIONS = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var needsReload = true;
|
var needsReload = true;
|
||||||
|
var oldSystemGet = System.get;
|
||||||
|
|
||||||
exports.reloadSources = function() {
|
exports.reloadSources = function() {
|
||||||
needsReload = true;
|
needsReload = true;
|
||||||
|
@ -63,6 +64,16 @@ function reloadCompiler() {
|
||||||
glob.sync(__dirname + '/src/**/*.js').forEach(function(fileName) {
|
glob.sync(__dirname + '/src/**/*.js').forEach(function(fileName) {
|
||||||
loadModule(fileName, true);
|
loadModule(fileName, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Traceur modules are register with the ".js" extension but we don't want
|
||||||
|
// to add it to all the import statements.
|
||||||
|
System.get = function get(normalizedName) {
|
||||||
|
var m = oldSystemGet.call(this, normalizedName);
|
||||||
|
if (!m && normalizedName.indexOf('traceur') == 0) {
|
||||||
|
m = oldSystemGet.call(this, normalizedName + '.js');
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadModule(filepath, transpile) {
|
function loadModule(filepath, transpile) {
|
||||||
|
@ -94,4 +105,4 @@ function extend(source, props) {
|
||||||
res[prop] = props[prop];
|
res[prop] = props[prop];
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue