Last active
June 7, 2018 00:55
-
-
Save sjmiles/f14ec792b9766fbb04ff to your computer and use it in GitHub Desktop.
Revisions
-
Scott J. Miles revised this gist
Jun 7, 2018 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ ## Polygit > Polygit is deprecated and only compatible with Bower and Polymer 1.0 & Polymer 2.0. > As an alternative, use this [Glitch](https://glitch.com/edit/#!/polymer-repro) to load dependencies via Bower. Polygit serves files directly from github (via `cdn.rawgit.com`) in a manner that is compatible with HTML Imports natural deduplication feature. Examples: @@ -85,4 +88,4 @@ Pull all `super-` elements from `sjmiles` org: `super*+sjmiles` `http://polygit.org/polymer+:master/super*+sjmiles+*/paper-button+v1.0.2/components/` Remember that all URLs hitting the magic server must contain the complete configuration. -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,13 +8,15 @@ Examples: ```html <base href="http://polygit.org/polymer+:master/components/"> <link href="polymer/polymer.html" rel="import"> ``` **Load polymer v1.0.3, load latest release of _vellum-*_ from _sjmiles_ org** ```html <base href="http://polygit.org/polymer+v1.0.3/vellum-*+sjmiles+*/components/"> <link href="polymer/polymer.html" rel="import"> <link href="vellum-grid/vellum-grid.html" rel="import"> ``` -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 32 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,33 @@ ## Polymer Magic Server The _Magic Server_ serves files directly from github (via `cdn.rawgit.com`) in a manner that is compatible with HTML Imports natural deduplication feature. Examples: **Load polymer from _master_ branch (full debug mode)** ```html <base href="http://polygit.org/polymer+:master/components/"> <link href="polymer/polymer.html" rel="import"> ``` **Load polymer v1.0.3, load latest release of _vellum-*_ from _sjmiles_ org** ```html <base href="http://polygit.org/polymer+v1.0.3/vellum-*+sjmiles+*/components/"> <link href="polymer/polymer.html" rel="import"> <link href="vellum-grid/vellum-grid.html" rel="import"> ``` ### Features: * stateless, stores nothing * maintenance free (modulo GitHub API access limits) * only serves files from `cdn.rawgit.com` ### Constraints: * configuration must be embedded in all request URLs * does no dependency resolution, user configuration is absolute * only serves files from `cdn.rawgit.com` 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. @@ -10,17 +37,17 @@ This server concept is primarily for hit-and-run testing, jsbins, etc. The perfo `<server-name>/[<configurations>/]components/<component>/<path>` Currently a server is stood up on app-engine at `polymer-magic-server.appspot.com`, which is aliased as `polygit.org`. `components` is literal. `<component>/<path>` is the canonical path to a component resource. Example using defaults (no `<configurations>`): ```html <link href="http://polygit.org/components/polymer/polymer.html" rel="import"> ``` Because the URL quickly becomes unwieldy, using `<base>` tag is recommended. ```html <base href="http://polygit.org/components/"> <link href="polymer/polymer.html" rel="import"> ``` @@ -54,6 +81,6 @@ Pull all `super-` elements from `sjmiles` org: `super*+sjmiles` ### Example base URL with multiple configurations `http://polygit.org/polymer+:master/super*+sjmiles+*/paper-button+v1.0.2/components/` Remember that all URLs hitting the magic server must contain the complete configuration. -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ The _Magic Server_ serves files directly from github (via `cdn.rawgit.com`) in a 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 concept is primarily for hit-and-run testing, jsbins, etc. The performance is less than ideal and there is very little error reporting or other niceties. ### Basic Usage -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -54,6 +54,6 @@ Pull all `super-` elements from `sjmiles` org: `super*+sjmiles` ### Example base URL with multiple configurations `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. -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ ## Polymer Magic Server 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. -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,8 @@ The _Magic Server_ serves files directly from github (via `cdn.rawgit.com`) in a 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. ### Basic Usage `<server-name>/[<configurations>/]components/<component>/<path>` -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -33,25 +33,25 @@ Default configuration is to use serve the latest **release** version for each co `<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` ### Example base URL with multiple configurations `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. -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,8 @@ Because the URL quickly becomes unwieldy, using `<base>` tag is recommended. <link href="polymer/polymer.html" rel="import"> ``` http://jsbin.com/wihame/edit?html,output ### Default Configuration 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`. @@ -53,4 +55,3 @@ 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. -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Example using defaults (no `<configurations>`): ```html <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. ```html <base href="http://polymer-magic-server.appspot.com/components/"> -
Scott J. Miles revised this gist
Jun 25, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,9 @@ Other implementations may be possible using cookies or other schemes to eliminat `<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>`): ```html <link href="http://polymer-magic-server.appspot.com/components/polymer/polymer.html" rel="import"> -
Scott J. Miles created this gist
Jun 25, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ ## Polymer Magic Server 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. ### Basic Usage `<server-name>/[<configurations>/]components/<component>/<path>` Currently a server is stood up at `polymer-magic-server.appspot.com` (use this for `<server-name>`). `components` is literal. `<component>/<path>` is the canonical path to a component resource. Example using default configuration (no `<configurations>`): ```html <link href="http://polymer-magic-server.appspot.com/components/polymer/polymer.html" rel="import"> ``` Because the URL quickly becomes unwieldy, using `<base>` tags is recommended. ```html <base href="http://polymer-magic-server.appspot.com/components/"> <link href="polymer/polymer.html" rel="import"> ``` ### Default Configuration 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`. ### Custom Configurations `<configurations>` are a series of configuration directives `<config1>[/<config2>...]`. Each `<config>` looks like `<component>[+<org>]+<ver>|master|*`. `master` means pull from latest SHA on master 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>|master|*`). Wilcards are supported in `component` Pull all `super-` elements from `sjmiles` org: `super*+sjmiles` ### Example base URL with multiple configurations `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.