Giter Club home page Giter Club logo

registry's Introduction

jspm Registry

View the registry file here

Pull requests welcome for registry.json to add or modify entries.

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:.

When requesting a module such as github:twbs/[email protected]/js/bootstrap.js, this corresponds to the URL https://github.jspm.io/twbs/[email protected]/js/bootstrap.js and the GitHub endpoint, returns the associated code.

The registry simply remembers the github:twbs/bootstrap part, allowing the shortcut form:

  System.import('[email protected]/js/bootstrap');

The registry.json is just a collection of these mappings:

  "bootstrap": "github:twbs/bootstrap"

Anyone is welcome to submit a mapping.

The current supported endpoint servers are:

  • Github (SPDY optimized)
  • npm (SPDY optimized)

Package.json Overrides

The registry also provides a service for overriding the package.json of existing repos.

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:

  • 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.

Read more about configuring packages for jspm in the wiki.

Some examples of package.json overrides for common packages:

Further examples of jspm package.json files for common packages can be found in the package overrides section of the registry. Pull requests are encouraged.

Testing Package Overrides

Package overrides may take some testing to get exactly the right configuration. The jspm CLI provides an option to specify the package override for testing in this way.

Simply add the -o option to an install to set the package override:

jspm install github:twbs/bootstrap -o "{ main: 'js/bootstrap', shim: { 'js/bootstrap': ['jquery'] } }"

Once tested the exact override can then be included in the here with a pull request.

Submitting a Package Override

To submit a new package override:

  • Fork this repo, then create the file package_overrides/[endpoint name]/[repo name]@x.y.z.json.
  • Provide the correct configuration according to the configuration guide above.
  • 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.

registry's People

Contributors

allouis avatar guybedford avatar jarreddebeer avatar matthewp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.