From 93e37d4fbe7279803fe87cacc1f8354df966870a Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Wed, 17 Dec 2014 16:06:12 +0200 Subject: [PATCH] Update README.md --- README.md | 45 ++++++++++----------------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index d29db5f..4272156 100644 --- a/README.md +++ b/README.md @@ -3,36 +3,19 @@ jspm Registry [View the registry file here](https://github.com/jspm/registry/blob/master/registry.json) -Pull requests welcome for `registry.json` to add or modify entries. +Pull requests welcome for `registry.json` and the `package_overrides` folder. -All registry entries are managed here through Github, moderated by the registry maintainers. +All registry entries are managed here through GitHub, moderated by the registry maintainers. Registry --- -Modules are served from _endpoint servers_. Endpoints include `github:` and `npm:`. +The currently supported endpoints are: -When requesting a module such as `github:twbs/bootstrap@3.0/js/bootstrap.js`, this corresponds to the URL -`https://github.jspm.io/twbs/bootstrap@3.0/js/bootstrap.js` and the **GitHub endpoint**, returns the associated code. +* Github +* npm -The registry simply remembers the `github:twbs/bootstrap` part, allowing the shortcut form: - -```javascript - System.import('bootstrap@3.0/js/bootstrap'); -``` - -The `registry.json` is just a collection of these mappings: - -```javascript - "bootstrap": "github:twbs/bootstrap" -``` - -Anyone is welcome to submit a mapping. - -The current supported endpoint servers are: - -* Github (SPDY optimized) -* npm (SPDY optimized) +The registry provides a simple mapping in the file [`registry.json`](https://github.com/jspm/registry/blob/master/registry.json), which maps a shortname (`bootstrap`) to a canonical endpoint name (`github:twbs/bootstrap`). It is simply a convenience for installing through jspm. Package.json Overrides --- @@ -41,25 +24,20 @@ The registry also provides a service for overriding the `package.json` of existi This is useful for enabling jspm functionality in the `package.json` when direct access to the underlying repo is not possible. -This is because jspm uses the `package.json` for modular package configuration, including: +jspm uses the `package.json` for modular package configuration, including: * Setting the main entry point (`main`) * Shim config for globals (`shim`) * Map configuration (`map`) * Module format (`format`) -* Auto-enabling minification (`buildOptions.minify`) In this way, the right package options can make any package play well with jspm, without needing any manual configuration at all. -Submitting a pull request to the original repo is still preferable to package overrides, this is a convenience service only and not a long term solution. +> Submitting a pull request to the original repo should be done at the same time as this is designed as a temporary service only and not a long term solution to the configuration problem. Read more about [configuring packages for jspm](https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm) in the wiki. -Some examples of package.json overrides for common packages: -* [Bootstrap](https://github.com/jspm/registry/blob/master/package-overrides/github/twbs/bootstrap%403.0.2.json) -* [Backbone Marionette](https://github.com/jspm/registry/blob/master/package-overrides/github/marionettejs/backbone.marionette%401.2.2.json) - -Further examples of jspm package.json files for common packages can be found in the [package overrides](https://github.com/jspm/registry/tree/master/package-overrides) section of the registry. Pull requests are encouraged. +Examples of jspm package.json files for common packages can be found in the [package overrides](https://github.com/jspm/registry/tree/master/package-overrides) section of the registry. ### Testing Package Overrides @@ -76,7 +54,4 @@ To submit a new package override: * Submit a pull request. * If the configuration is correct, this will be accepted and that will instantly enable the functionality on the endpoint. -The overrides only apply to exact version, tag or branch names. When set to an exact semver version, the override will apply for all semver versions greater than that version. - - - +> The overrides will apply for all versions semver compatible with the override version, with the highest version override taking precedence.