Created
March 20, 2014 10:37
-
-
Save dignifiedquire/9661101 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export var app = { | |
start: function () { | |
console.log('Starting application'); | |
}, | |
load: function (module) { | |
console.log('Loading %s', module); | |
return System.import(module); | |
} | |
}; |
This file contains hidden or 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="https://jspm.io/[email protected]"></script> | |
<script> | |
System.paths['*'] = '/*.js'; | |
System.import('app').then(function (m) { | |
var app = m.app; | |
app.start(); | |
return app.load('npm:jquery').then(function (jquery) { | |
console.log('Loaded jquery'); | |
console.log(jquery); | |
}); | |
}).catch(function (err) { | |
console.error(err); | |
}); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run:
look at the console output :)