Last active
August 29, 2015 14:07
-
-
Save vojtajina/27c84a4dd346a2f539c8 to your computer and use it in GitHub Desktop.
Tracuer with es6-module-loader and systemjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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...'); | |
} | |
}; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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