Last active
January 6, 2016 11:25
-
-
Save Hypercubed/76a1bf7b7d276b1548a0 to your computer and use it in GitHub Desktop.
systemjs-twitter-widgets
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
System.config({ | |
baseURL: "/", | |
defaultJSExtensions: true, | |
transpiler: false, | |
paths: { | |
"twitter": "//platform.twitter.com/widgets.js" // must be a path, map will cause an error when bundling (May change in SystemJS Builder v0.15) | |
}, | |
meta: { | |
"twitter": { | |
"build": false, // don't build (May not be needed in SystemJS Builder v.15) | |
"scriptLoad": true, // load in a script tag to avoid XHR error (option, SystemJS assumes script load when format: 'global') | |
"format": "global", | |
"exports": "twttr" | |
} | |
} | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>systemjs-twitter-widgets</title> | |
<base href="."> | |
</head> | |
<body> | |
<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">Load JavaScript Interfaces for Twitter for Websites using SystemJS. <a href="https://t.co/VgCXv94IsP">https://t.co/VgCXv94IsP</a></p>— Jayson Harshbarger (@hypercubed) <a href="https://twitter.com/hypercubed/status/684564471746985986">January 6, 2016</a></blockquote> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/systemjs/0.18.4/system.js"></script> | |
<script src="config.js"></script> | |
<script> | |
System.import('./index') | |
.then(null, console.error.bind(console)); | |
</script> | |
</body> | |
</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
require('twitter'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment