The Magic Server serves files directly from github (via cdn.rawgit.com) in a manner that is compatible with HTML Imports natural deduplication feature. This implementation uses a fat URL scheme, where the user configuration is contained entirely in each URL (making the URLs potentially quite long).
Other implementations may be possible using cookies or other schemes to eliminate the need for fat URLs.
This server is primarily for hit-and-run testing, jsbins, etc. The performance is less than ideal.
<server-name>/[<configurations>/]components/<component>/<path>
Currently a server is stood up at polymer-magic-server.appspot.com. components is literal. <component>/<path> is the canonical path to a component resource.
Example using defaults (no <configurations>):
<link href="http://polymer-magic-server.appspot.com/components/polymer/polymer.html" rel="import">Because the URL quickly becomes unwieldy, using <base> tag is recommended.
<base href="http://polymer-magic-server.appspot.com/components/">
<link href="polymer/polymer.html" rel="import">http://jsbin.com/wihame/edit?html,output
Default configuration is to use serve the latest release version for each component. An organization is automatically selected for polymer, webcomponents*, google-* components. All other components are assumed to be PolymerElements.
<configurations> are a series of configuration directives <config1>[/<config2>...].
Each <config> looks like <component>[+<org>]+<ver>|:<branch>|*.
:<branch> means pull from latest SHA on <branch>.
* means pull latest release.
Examples,
Pull polymer from default org, master branch: polymer+:master
Pull super-gif from sjmiles org, latest release: super-gif+sjmiles+*
Pull paper-button from default org, v1.0.2 release: paper-button+v1.0.2
Note: if <org> is specified, do not forget to also include version information (+<ver>|:<branch>|*).
Wilcards are supported in component
Pull all super- elements from sjmiles org: super*+sjmiles
http://polymer-magic-server.appspot.com/polymer+:master/super*-sjmiles-*/paper-button+v1.0.2/components/
Remember that all URLs hitting the magic server must contain the complete configuration.
Would it be possible to add the the web-animations-js files to the cdn ?
If I import an element that relies on neon-animation, it will try to import web-animation-js polyfills, which will fail ?