diff --git a/README.md b/README.md new file mode 100644 index 0000000..6caafc1 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +jspm Registry +--- + +Pull requests welcome! + +While the registry is small enough, all registry entries are managed through Github, moderated by the registry maintainers. + +* The registry provides a mapping from a unique registry name (`jquery`), to a target package (`github:components/jquery` / `npm:jquery`). +* For ease of reference, please ensure new names are added in the correct alphabetical location. +* An optional `main` entry point can be specified with `#main-file-name`. For example: + + `"jquery": "github:components/jquery#jquery" + + will map: + + * `jquery` -> `github:components/jquery/jquery` + * `jquery/submodule` -> `github:components/jquery/submodule` + + It is simply a shorthand for specifying the main entry point when the package is requested directly by name. + +* Currently the following `locations` are available in the registry mapping: + + * `github:*`: Maps to the Github service. + * `npm:*` : Maps to the NPM service. + + In this way, any package on Github or NPM is available for reference in the jspm registry. + + Additional locations are in planning for other servies. Anyone can provide a location service. To provide a new + location service, see the Location Service Guidelines, then contact us directly to have your location service + included in jspm. + + +Package Overrides +--- + +The registry also provides a `package.json` override system. + +All jspm package configuration options are specified in the `package.json` file for packages. The jspm `package.json` +extension properties are documented here. Often changes need to be made to packages one may not have maintainer access to. +In this case, submit the `package.json` as an override in this repo to override the `package.json` file jspm uses for a given package. + +The overrides are located in the `package-overrides` folder of this repo, with the folder format: + +`package-overrides/[location-name]/[location-path]@[version].json` + +Only exact semver versions can be used, excluding semver build numbers and suffices. + +For example, a package override for `jquery` would be located at: + +`package-overrides/github/jquery/jquery@2.0.0.json` diff --git a/jquery.js b/jquery.js deleted file mode 100644 index e39092e..0000000 --- a/jquery.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('github:jquery/codeorigin.jquery.com/cdn/jquery-2.0.3'); diff --git a/package-overrides/github/twbs/bootstrap@3.0.0.json b/package-overrides/github/twbs/bootstrap@3.0.0.json new file mode 100644 index 0000000..6652dd5 --- /dev/null +++ b/package-overrides/github/twbs/bootstrap@3.0.0.json @@ -0,0 +1,9 @@ +{ + "main": "js/bootstrap", + "depends": { + "js/bootstrap": ["lib:jquery", "bootstrap.css!"] + }, + "directories": { + "lib": "dist" + } +} diff --git a/registry.json b/registry.json index 972da42..ae7ff60 100644 --- a/registry.json +++ b/registry.json @@ -1,7 +1,7 @@ { + "angular": "cdnjs:angular.js/{version}#angular", + "angular-ui": "cdnjs:angular-ui/{version}#angular-ui", + "bootstrap": "github:twbs/bootstrap#js/bootstrap", "jquery": "github:components/jquery", - "angular": "cdnjs:angular.js/{version=1.1.5,1.1.4}#/angular", - "angular-ui": "cdnjs:angular-ui/{version=0.4.0}#/angular-ui", - "bootstrap": "github:twbs/bootstrap", - "webfont": "cdnjs:webfont/{version=1.3.0}#/webfont" + "webfont": "cdnjs:webfont/{version}#webfont" } diff --git a/webfont.js b/webfont.js deleted file mode 100644 index b7dd250..0000000 --- a/webfont.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2013 Small Batch, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -;(function(window,document,undefined){ -var j=void 0,k=!0,l=null,p=!1;function q(a){return function(){return this[a]}}var aa=this;function ba(a,b){var c=a.split("."),d=aa;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&b!==j?d[e]=b:d=d[e]?d[e]:d[e]={}}aa.Ba=k;function ca(a,b,c){return a.call.apply(a.bind,arguments)} -function da(a,b,c){if(!a)throw Error();if(2w';a.R=/top/.test(b.getElementsByTagName("a")[0].getAttribute("style"))}return a.R}function x(a){var b=a.u.location.protocol;"about:"==b&&(b=a.G.location.protocol);return"https:"==b?"https:":"http:"};function y(a,b,c){this.w=a;this.T=b;this.Aa=c}ba("webfont.BrowserInfo",y);y.prototype.qa=q("w");y.prototype.hasWebFontSupport=y.prototype.qa;y.prototype.ra=q("T");y.prototype.hasWebKitFallbackBug=y.prototype.ra;y.prototype.sa=q("Aa");y.prototype.hasWebKitMetricsBug=y.prototype.sa;function z(a,b,c,d){this.e=a!=l?a:l;this.o=b!=l?b:l;this.ba=c!=l?c:l;this.f=d!=l?d:l}var ja=/^([0-9]+)(?:[\._-]([0-9]+))?(?:[\._-]([0-9]+))?(?:[\._+-]?(.*))?$/;z.prototype.toString=function(){return[this.e,this.o||"",this.ba||"",this.f||""].join("")}; -function A(a){a=ja.exec(a);var b=l,c=l,d=l,e=l;a&&(a[1]!==l&&a[1]&&(b=parseInt(a[1],10)),a[2]!==l&&a[2]&&(c=parseInt(a[2],10)),a[3]!==l&&a[3]&&(d=parseInt(a[3],10)),a[4]!==l&&a[4]&&(e=/^[0-9]+$/.test(a[4])?parseInt(a[4],10):a[4]));return new z(b,c,d,e)};function B(a,b,c,d,e,f,g,h,n,m,r){this.J=a;this.Ha=b;this.za=c;this.ga=d;this.Fa=e;this.fa=f;this.xa=g;this.Ga=h;this.wa=n;this.ea=m;this.k=r}ba("webfont.UserAgent",B);B.prototype.getName=q("J");B.prototype.getName=B.prototype.getName;B.prototype.pa=q("za");B.prototype.getVersion=B.prototype.pa;B.prototype.la=q("ga");B.prototype.getEngine=B.prototype.la;B.prototype.ma=q("fa");B.prototype.getEngineVersion=B.prototype.ma;B.prototype.na=q("xa");B.prototype.getPlatform=B.prototype.na;B.prototype.oa=q("wa"); -B.prototype.getPlatformVersion=B.prototype.oa;B.prototype.ka=q("ea");B.prototype.getDocumentMode=B.prototype.ka;B.prototype.ja=q("k");B.prototype.getBrowserInfo=B.prototype.ja;function C(a,b){this.a=a;this.H=b}var ka=new B("Unknown",new z,"Unknown","Unknown",new z,"Unknown","Unknown",new z,"Unknown",j,new y(p,p,p)); -C.prototype.parse=function(){var a;if(-1!=this.a.indexOf("MSIE")){a=D(this);var b=E(this),c=A(b),d=F(this.a,/MSIE ([\d\w\.]+)/,1),e=A(d);a=new B("MSIE",e,d,"MSIE",e,d,a,c,b,G(this.H),new y("Windows"==a&&6<=e.e||"Windows Phone"==a&&8<=c.e,p,p))}else if(-1!=this.a.indexOf("Opera"))a:{a="Unknown";var b=F(this.a,/Presto\/([\d\w\.]+)/,1),c=A(b),d=E(this),e=A(d),f=G(this.H);c.e!==l?a="Presto":(-1!=this.a.indexOf("Gecko")&&(a="Gecko"),b=F(this.a,/rv:([^\)]+)/,1),c=A(b));if(-1!=this.a.indexOf("Opera Mini/")){var g= -F(this.a,/Opera Mini\/([\d\.]+)/,1),h=A(g);a=new B("OperaMini",h,g,a,c,b,D(this),e,d,f,new y(p,p,p))}else{if(-1!=this.a.indexOf("Version/")&&(g=F(this.a,/Version\/([\d\.]+)/,1),h=A(g),h.e!==l)){a=new B("Opera",h,g,a,c,b,D(this),e,d,f,new y(10<=h.e,p,p));break a}g=F(this.a,/Opera[\/ ]([\d\.]+)/,1);h=A(g);a=h.e!==l?new B("Opera",h,g,a,c,b,D(this),e,d,f,new y(10<=h.e,p,p)):new B("Opera",new z,"Unknown",a,c,b,D(this),e,d,f,new y(p,p,p))}}else if(/AppleWeb(K|k)it/.test(this.a)){a=D(this);var b=E(this), -c=A(b),d=F(this.a,/AppleWeb(?:K|k)it\/([\d\.\+]+)/,1),e=A(d),f="Unknown",g=new z,h="Unknown",n=p;-1!=this.a.indexOf("Chrome")||-1!=this.a.indexOf("CrMo")||-1!=this.a.indexOf("CriOS")?f="Chrome":/Silk\/\d/.test(this.a)?f="Silk":"BlackBerry"==a||"Android"==a?f="BuiltinBrowser":-1!=this.a.indexOf("Safari")?f="Safari":-1!=this.a.indexOf("AdobeAIR")&&(f="AdobeAIR");"BuiltinBrowser"==f?h="Unknown":"Silk"==f?h=F(this.a,/Silk\/([\d\._]+)/,1):"Chrome"==f?h=F(this.a,/(Chrome|CrMo|CriOS)\/([\d\.]+)/,2):-1!= -this.a.indexOf("Version/")?h=F(this.a,/Version\/([\d\.\w]+)/,1):"AdobeAIR"==f&&(h=F(this.a,/AdobeAIR\/([\d\.]+)/,1));g=A(h);n="AdobeAIR"==f?2e.e||536==e.e&&11>e.o,"iPhone"==a||"iPad"==a||"iPod"==a||"Macintosh"==a))}else-1!=this.a.indexOf("Gecko")?(a="Unknown",b=new z,c="Unknown",d=E(this),e=A(d),f=p,-1!=this.a.indexOf("Firefox")?(a= -"Firefox",c=F(this.a,/Firefox\/([\d\w\.]+)/,1),b=A(c),f=3<=b.e&&5<=b.o):-1!=this.a.indexOf("Mozilla")&&(a="Mozilla"),g=F(this.a,/rv:([^\)]+)/,1),h=A(g),f||(f=1=a.S?a.k.T&&sa(a,b,c)&&(a.Z===l||a.Z.hasOwnProperty(a.q.getName()))?P(a,a.V):P(a,a.ta):setTimeout(s(function(){ra(this)},a),25):P(a,a.V)}function P(a,b){a.A.remove();a.B.remove();b(a.q)};function R(a,b,c,d){this.c=b;this.t=c;this.N=0;this.ca=this.Y=p;this.S=d;this.k=a.k}function ta(a,b,c,d,e){if(0===b.length&&e)K(a.t);else{a.N+=b.length;e&&(a.Y=e);for(e=0;e