fix(example): make it work

This commit is contained in:
Vojta Jina 2014-11-04 15:05:33 -08:00
parent 1dc5a22f07
commit 2b7738c12c
3 changed files with 26 additions and 6 deletions

View File

@ -53,6 +53,7 @@ gulp.task('jsRuntime/build', function() {
var traceurRuntime = gulp.src([
gulpTraceur.RUNTIME_PATH,
"node_modules/es6-module-loader/dist/es6-module-loader-sans-promises.src.js",
"node_modules/systemjs/dist/system.src.js",
"node_modules/systemjs/lib/extension-register.js"
]).pipe(gulp.dest('build/js'));
return traceurRuntime;

View File

@ -10,11 +10,11 @@
<% } else { %>
<script src="../../../traceur-runtime.js" type="text/javascript"></script>
<script src="../../../rtts_assert/lib/rtts_assert.js" type="text/javascript"></script>
<script src="../../../es6-module-loader-sans-promises.src.js"></script>
<script src="../../../system.src.js"></script>
<script src="../../../extension-register.js"></script>
<script src="app.js" type="text/javascript"></script>
<script src="../../../facade/lib/dom.js" type="text/javascript"></script>
<script src="main.es5" type="text/javascript"></script>
<script src="main.js" type="text/javascript"></script>
<% } %>
</body>
</html>
</html>

View File

@ -1 +1,20 @@
new (System.get("examples/todo/app").App)().run();
register(System);
System.baseURL = '../../../';
// So that we can import packages like `core/foo`, instead of `core/src/foo`.
System.paths = {
'core/*': './core/src/*.js',
'change_detection/*': './change_detection/src/*.js',
'facade/*': './facade/lib/*.js',
'di/*': './di/src/*.js',
'rtts_assert/*': './rtts_assert/lib/*.js',
'examples/*': './examples/lib/*.js'
};
System.import('examples/todo/app').then(function(m) {
(new m.App).run();
}, function(e) {
console.error(e.stack || e);
});