Skip to content

Instantly share code, notes, and snippets.

@vojtajina
Last active Aug 29, 2015
Embed
What would you like to do?
Tracuer with es6-module-loader and systemjs
// Transpiled by
// ./node_modules/traceur/traceur --modules=instantiate
System.register("foo", [], function($__export) {
"use strict";
var __moduleName = "foo";
return {
setters: [],
execute: function() {
console.log('executing...');
}
};
});
<html>
<head>
<script src="node_modules/traceur/bin/traceur-runtime.js"></script>
<script src="node_modules/es6-module-loader/dist/es6-module-loader.src.js"></script>
<script src="node_modules/systemjs/lib/extension-register.js"></script>
<script>
register(System);
System.baseURL = '/';
System.import('foo').then(function(m) {
console.log('done', m);
}, function(e) {
console.error(e)
})
</script>
</head>
</html>
{
"name": "traceur-with-es6loader",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"es6-module-loader": "^0.9.2",
"systemjs": "^0.9.0",
"traceur": "0.0.66"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment