{"_id":"jspm-loader","_rev":"127592","name":"jspm-loader","description":"AMD, CommonJS and ES6 module loader","dist-tags":{"latest":"0.3.1"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"time":{"modified":"2021-06-03T11:04:48.000Z","created":"2013-08-30T19:07:04.101Z","0.3.1":"2013-12-06T12:32:22.051Z","0.3.0":"2013-12-05T16:03:37.760Z","0.2.4":"2013-11-23T11:55:33.949Z","0.2.3":"2013-11-12T13:52:44.274Z","0.2.2":"2013-11-07T15:07:51.880Z","0.2.1":"2013-09-30T10:25:26.170Z","0.2.0":"2013-09-23T15:32:26.154Z","0.1.2":"2013-08-30T19:07:04.101Z"},"users":{"parroit":true,"jhabdas":true,"hendrik.bunnick":true},"author":{"name":"Guy Bedford"},"repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"versions":{"0.3.1":{"name":"jspm-loader","version":"0.3.1","description":"AMD, CommonJS and ES6 module loader","main":"loader.js","repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"author":{"name":"Guy Bedford"},"license":"MIT","dependencies":{"es6-module-loader":"~0.3.0"},"files":["loader.js"],"readmeFilename":"README.md","bugs":{"url":"https://github.com/jspm/jspm-loader/issues"},"_id":"jspm-loader@0.3.1","dist":{"shasum":"81669bf15617e3d210af1b01f9bf5261aa363d9c","size":13910,"noattachment":false,"key":"/jspm-loader/-/jspm-loader-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/jspm-loader/download/jspm-loader-0.3.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"guybedford","email":"guybedford@gmail.com"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1386333142051,"_cnpm_publish_time":1386333142051,"deprecated":"This repo is out of date - use SystemJS or jspm instead.","_hasShrinkwrap":false},"0.3.0":{"name":"jspm-loader","version":"0.3.0","description":"AMD, CommonJS and ES6 module loader","main":"loader.js","repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"author":{"name":"Guy Bedford"},"license":"MIT","dependencies":{"es6-module-loader":"~0.3.0"},"files":["loader.js"],"readmeFilename":"README.md","bugs":{"url":"https://github.com/jspm/jspm-loader/issues"},"_id":"jspm-loader@0.3.0","dist":{"shasum":"931fb2d84428cbdb923979ed1f279db9bd16299e","size":13746,"noattachment":false,"key":"/jspm-loader/-/jspm-loader-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/jspm-loader/download/jspm-loader-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"guybedford","email":"guybedford@gmail.com"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1386259417760,"_cnpm_publish_time":1386259417760,"deprecated":"This repo is out of date - use SystemJS or jspm instead.","_hasShrinkwrap":false},"0.2.4":{"name":"jspm-loader","version":"0.2.4","description":"AMD, CommonJS and ES6 module loader","main":"loader.js","repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"author":{"name":"Guy Bedford"},"license":"MIT","dependencies":{"es6-module-loader":"~0.3.0"},"files":["loader.js"],"readmeFilename":"README.md","bugs":{"url":"https://github.com/jspm/jspm-loader/issues"},"_id":"jspm-loader@0.2.4","dist":{"shasum":"8c034d342d466b2d5344ff9f598a4a6ee4f1dd13","size":11363,"noattachment":false,"key":"/jspm-loader/-/jspm-loader-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/jspm-loader/download/jspm-loader-0.2.4.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"guybedford","email":"guybedford@gmail.com"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1385207733949,"_cnpm_publish_time":1385207733949,"deprecated":"This repo is out of date - use SystemJS or jspm instead.","_hasShrinkwrap":false},"0.2.3":{"name":"jspm-loader","version":"0.2.3","description":"AMD, CommonJS and ES6 module loader","main":"loader.js","repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"author":{"name":"Guy Bedford"},"license":"MIT","dependencies":{"es6-module-loader":"~0.3.0"},"files":["loader.js"],"readmeFilename":"README.md","bugs":{"url":"https://github.com/jspm/jspm-loader/issues"},"_id":"jspm-loader@0.2.3","dist":{"shasum":"70148895ca70da9d5c72ee04d17e309e9833f4ac","size":11408,"noattachment":false,"key":"/jspm-loader/-/jspm-loader-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/jspm-loader/download/jspm-loader-0.2.3.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"guybedford","email":"guybedford@gmail.com"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1384264364274,"_cnpm_publish_time":1384264364274,"deprecated":"This repo is out of date - use SystemJS or jspm instead.","_hasShrinkwrap":false},"0.2.2":{"name":"jspm-loader","version":"0.2.2","description":"AMD, CommonJS and ES6 module loader","main":"loader.js","repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"author":{"name":"Guy Bedford"},"license":"MIT","dependencies":{"es6-module-loader":"~0.3.0"},"files":["loader.js"],"readmeFilename":"README.md","bugs":{"url":"https://github.com/jspm/jspm-loader/issues"},"_id":"jspm-loader@0.2.2","dist":{"shasum":"4d64eceb9054b23e7fdc9eb3ba49e750a54e95fd","size":10968,"noattachment":false,"key":"/jspm-loader/-/jspm-loader-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/jspm-loader/download/jspm-loader-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"guybedford","email":"guybedford@gmail.com"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1383836871880,"_cnpm_publish_time":1383836871880,"deprecated":"This repo is out of date - use SystemJS or jspm instead.","_hasShrinkwrap":false},"0.2.1":{"name":"jspm-loader","version":"0.2.1","description":"AMD, CommonJS and ES6 module loader","main":"loader.js","repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"author":{"name":"Guy Bedford"},"license":"MIT","dependencies":{"es6-module-loader":"~0.3.0"},"files":["loader.js"],"readmeFilename":"README.md","bugs":{"url":"https://github.com/jspm/jspm-loader/issues"},"_id":"jspm-loader@0.2.1","dist":{"shasum":"c9ae4778b1702a70702ce99df176a84cbdeb9a56","size":10612,"noattachment":false,"key":"/jspm-loader/-/jspm-loader-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/jspm-loader/download/jspm-loader-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"guybedford","email":"guybedford@gmail.com"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1380536726170,"_cnpm_publish_time":1380536726170,"deprecated":"This repo is out of date - use SystemJS or jspm instead.","_hasShrinkwrap":false},"0.2.0":{"name":"jspm-loader","version":"0.2.0","description":"AMD, CommonJS and ES6 module loader","main":"loader.js","repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"author":{"name":"Guy Bedford"},"license":"MIT","dependencies":{"es6-module-loader":"~0.3.0"},"files":["loader.js"],"readmeFilename":"README.md","bugs":{"url":"https://github.com/jspm/jspm-loader/issues"},"_id":"jspm-loader@0.2.0","dist":{"shasum":"11c020f2f914083be4fdc1c99a948c6b77c539c8","size":10034,"noattachment":false,"key":"/jspm-loader/-/jspm-loader-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/jspm-loader/download/jspm-loader-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"guybedford","email":"guybedford@gmail.com"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1379950346154,"_cnpm_publish_time":1379950346154,"deprecated":"This repo is out of date - use SystemJS or jspm instead.","_hasShrinkwrap":false},"0.1.2":{"name":"jspm-loader","version":"0.1.2","description":"AMD, CommonJS and ES6 module loader","main":"loader.js","repository":{"type":"git","url":"git://github.com/jspm/jspm-loader"},"author":{"name":"Guy Bedford"},"license":"MIT","dependencies":{"es6-module-loader":"~0.2.4"},"files":["loader.js"],"readmeFilename":"README.md","_id":"jspm-loader@0.1.2","dist":{"shasum":"b965b976a0b346939f028655aa4279e6b9735ced","size":9053,"noattachment":false,"key":"/jspm-loader/-/jspm-loader-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/jspm-loader/download/jspm-loader-0.1.2.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"guybedford","email":"guybedford@gmail.com"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"}],"directories":{},"publish_time":1377889624101,"_cnpm_publish_time":1377889624101,"deprecated":"This repo is out of date - use SystemJS or jspm instead.","_hasShrinkwrap":false}},"readme":"jspm loader\n===========\n\nNext-generation module loading in all browsers today.\n\n* Loads ES6 modules, AMD, CommonJS and global scripts detecting the format automatically.\n* Optionally load modules directly from GitHub or npm with [jspm registry](https://github.com/jspm/registry) and CDN support out of the box.\n* Uses RequireJS-inspired configuration options including baseURL, map, shim and custom paths.\n* Built on top of the standards-compliant [ES6 Module Loader polyfill](https://github.com/ModuleLoader/es6-module-loader).\n* ~25KB total size minified, ~15KB for loader.js and ~11KB for es6-module-loader.js.\n\nFor the loader documentation and getting started guide, read below. \n\nFor a basic introduction and explanation with examples, see [https://jspm.io](https://jspm.io).\n\nGetting Started\n---\n\n1. [Including the Loader](#including-the-loader)\n2. [Setting the Configuration](#setting-the-configuration)\n3. [Loading Application Code from the baseURL](#loading-application-code-from-the-baseurl)\n4. [Loading External Packages from Endpoints](#loading-external-packages-from-endpoints)\n5. [Map Configuration](#map-configuration)\n6. [Loading External Packages from the jspm Registry](#loading-external-packages-from-the-jspm-registry)\n7. [Installing Libraries Locally](#installing-libraries-locally)\n8. [Package Configuration](#package-configuration)\n9. [Cache Busting](#cache-busting)\n10. [Plugins](#plugins)\n\n### Including the Loader\n\nThe loader can be included from the CDN or locally. The CDN version can be useful for quick experimentation and is also suitable for production use.\n\n#### CDN Version\n\nInclude the following script in the page:\n\n```html\n  <script src=\"https://jspm.io/loader.js\"></script>\n```\n\n#### Locally Hosted\n\nDownload [`es6-module-loader.js`](https://github.com/ModuleLoader/es6-module-loader/blob/master/dist/es6-module-loader.js) and [`traceur.js`](https://github.com/ModuleLoader/es6-module-loader/blob/master/dist/traceur.js) from the [ES6-loader polyfill](https://github.com/ModuleLoader/es6-module-loader) and locate them in the same folder as `loader.js` from this repo.\n\nThen include `loader.js` with a script tag:\n\n```html\n  <script src=\"loader.js\"></script>\n```\n\n`es6-module-loader.js` will then be included automatically and the [Traceur](https://github.com/google/traceur-compiler) parser is dynamically included from `traceur.js` when loading an ES6 module only.\n\n### Setting the Configuration\n\nTypically one would include a configuration file immediately after the loader script, although this can be done inline as well.\n\n```html\n  <script src=\"config.js\"></script>\n```\n\nconfig.js:\n```javascript\n  jspm.config({\n    baseURL: '/lib'\n  });\n```\n\nThe `baseURL` sets the folder where local scripts will be loaded. By default it is set to the HTML page URL.\n\n### Loading Application Code from the baseURL\n\nModules are dependency-managed JavaScript files. They are loaded by a **module name** reference.\n\nEach module name directly corresponds to a JavaScript file URL, but without the `.js` extension, and with baseURL rules.\n\nFor example, modules can be loaded from the baseURL with the syntax `~`:\n\n<pre>\n  ~/my/module -> [baseURL]/my/module.js\n</pre>\n\nIn the `index.html` page we can then load a module from the baseURL folder with:\n\n```html\n<script>\n  // loads [baseURL]/test.js returning the defined module object.\n  jspm.import('~/test', function(test) {\n    console.log(test);\n  });\n</script>\n```\n\nSince we set the baseURL to `/lib`, we can write:\n\nlib/test.js:\n```javascript\n  define(function() {\n    return {\n      isAMD: 'yup'\n    };\n  });\n```\n\n> _Note that when running locally, ensure you are running from a local server or a browser with local XHR requests enabled. If not you will get an error message._\n\n> _For Chrome on Mac, you can run it with: `/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --allow-file-access-from-files &> /dev/null &`_\n\n> _In Firefox this requires navigating to `about:config`, entering `security.fileuri.strict_origin_policy` in the filter box and toggling the option to false._\n\n#### Writing Modular Code\n\nIt is recommended to write modular code in either AMD or CommonJS. Both are equally supported by jspm, with the format detected automatically.\n\nFor example, we can write modular CommonJS:\n\n/lib/app.js:\n```javascript\n  var subModule = require('./submodule/submodule');\n  //...\n  subModule.someMethod();\n  //...\n```\n\n/lib/submodule/submodule.js:\n```javascript\n  exports.someMethod = function() {\n\n  }\n```\n\nand load this with `jspm.import('~/app')` in the page.\n\n> Note: always use relative requires of the form `./` or `../` to reference modules in the same package. This is important within any package for modularity.\n\n#### AMD Compatibility\n\njspm provides an AMD compatibility layer, with the goal of supporting as much of the RequireJS test suite as possible to ensure functioning of existing AMD code.\n\nTo create the `requirejs` and `require` globals as AMD globals, simply include the following `<script>` tag immediately after the inclusion of the jspm loader:\n\n```html\n  <script>\n    require = requirejs = jspm.require;\n  </script>\n```\n\nThis should replicate a fair amount of RequireJS functionality, and support is improving over time.\n\nNote that AMD-style plugins are not supported.\n\n#### Loading ES6 Modules\n\njspm is an ES6 module loader. It will detect and load ES6 modules, parsing them with Traceur dynamically. This allows for dynamic loading of ES6 without a build step, although a build step still needs to be run to transpile ES6 back to ES5 and AMD for production. This use case will grow over time.\n\nRead more about ES6 modules and module loaders at the [ES6 Module Loader polyfill repo](https://github.com/ModuleLoader/es6-module-loader).\n\n#### Loading Globals\n\nGlobal scripts can also be loaded with jspm, and any globals they write to the `window` object will be converted into a special separate module object for the global.\n\nThis provides careful protection against global collisions, allowing global scripts to write to the same global variables without conflict.\n\nMost global scripts will still need some [shim configuration](#shim-configuration) as in RequireJS to set their dependencies.\n\n### Loading External Packages from Endpoints\n\nEndpoints provide collections of packages that can be downloaded or served over CDN.\n\nCurrently the following endpoints are supported:\n\n* GitHub: `jspm.import('github:name/repo@version')`\n* npm: `jspm.import('npm:repo@version')`\n* cdnJS: `jspm.import('cdnjs:name/version')`\n\nUse of these endpoints is entirely optional, and custom endpoints can easily be created or overrided in the loader.\n\nGitHub and npm both have endpoint services provided by jspm, allowing easy access to their modules.\n\nThe following will work without any installation necessary:\n\n```javascript\n  // load the latest stable version of underscore from npm\n  jspm.import('npm:lodash-node/modern/objects/isEqual', function($) {\n  });\n\n  // load the latest stable version of Bootstrap, from the 'js' folder in the Bootstrap release on GitHub\n  jspm.import('github:twbs/bootstrap/js/bootstrap', function(bootstrap) {\n  });\n\n  // load the latest minor version of jquery from GitHub\n  jspm.import('github:components/jquery@2.0/jquery', function($) {\n  });\n```\n\nIn the above examples, the following module names are converted directly into the following URLs:\n\n<pre>\n  npm:lodash-node/modern/objects/isEqual -> https://npm.jspm.io/lodash-node/modern/objects/isEqual.js\n  github:twbs/bootstrap/js/bootstrap     -> https://github.jspm.io/twbs/bootstrap/js/bootstrap.js\n  github:components/jquery@2.0/jquery    -> https://github.jspm.io/components/jquery@2.0/jquery.js\n</pre>\n\nThe endpoint servers then provide the correct modular code from the package and version specified.\n\nThe CDN runs over SPDY so that all requests can travel over a single connection, and SPDY push is used to send module dependencies so that a new round trip is not needed everytime a dependency of a module is discovered.\n\nTo create a custom endpoint, use the configuration:\n\n```javascript\n  jspm.config({\n    endpoints: {\n      myendpoint: 'https://some-url.com'\n    }\n  });\n  // now jspm.import('myendpoint:hello') -> https://some-url.com/hello.js\n```\n\n> Endpoints are independent CDNs. Other examples of services that would be appropriate for endpoints include Bitbucket, Google Code, etc. \n  The NodeJS server running the npm and GitHub CDNs will be open sourced when ready to allow anyone to host a custom service endpoint, \n  as well as a mirror of the GitHub or npm endpoints. For more information about endpoints, [read the wiki here](https://github.com/jspm/registry/wiki/Endpoint-Conventions).\n\n### Map Configuration\n\nInstead of writing `github:components/jquery@2.0`, typically one would write `jquery` in all local application code.\n\nWe then _map_ `jquery -> github:components/jquery@2.0` with global map config for our application.\n\n```javascript\n  jspm.config({\n    baseURL: '/lib',\n    map: {\n      jquery: 'github:components/jquery@2.0'\n    }\n  });\n```\n\nThis means that any import/require for `jquery` in any module will now get the exact jQuery version we want.\n\nThis is far better than specifying the full endpoint directly as it makes it very easy to update jQuery to a new version or endpoint. This is the most important configuration option for dependency-managed packages.\n\n### Loading External Packages from the jspm Registry\n\nIt can be difficult to know exactly what the most maintained endpoint is for a specific package and remember this endpoint each time.\n\nInstead of needing to know `github:twbs/bootstrap` is the maintained package endpoint for Bootstrap, the jspm registry provides a simple service to remember the main endpoint for libraries.\n\nWe simply write:\n\n```javascript\n  jspm.import('bootstrap');\n```\n\nAnd if no other map configuration applies, the loader will convert this into the URL:\n\n<pre>\n  bootstrap -> https://registry.jspm.io/bootstrap.js\n</pre>\n\nThis module simply forwards to the correct location at `github:twbs/bootstrap`.\n\nUse of the [jspm registry](https://github.com/jspm/registry) is also entirely optional. The `registryURL` can also be changed to be a local folder or another URL with the configuration:\n\n```javascript\n  jspm.config({\n    registryURL: '/public-libs'\n  });\n```\n\n> The registry is still growing, and a list of the modules currently in the registry can be [found here](https://github.com/jspm/registry/blob/master/registry.json). Additions can be made with pull requests, or requested as issues.\n\n#### Setting Package Sources and Versions\n\nThe jspm registry, GitHub and npm endpoints use simple version conventions to provide version-managed packages.\n\nWhen no version is specified, the latest stable version is used.\n\nOtherwise an `@` sign can be used to indicate a version.\n\nExamples:\n\n**Latest Stable Version**\n\n```javascript\n  jspm.import('jquery');\n  jspm.import('npm:underscore');\n```\n\n**Latest Revision of Minor Version**\n\n```javascript\n  jspm.import('jquery@2.0');\n  jspm.import('bootstrap@3.0');\n```\n\n**Exact Version**\n\nThis supports both version names and semvers:\n\n```javascript\n  jspm.import('jquery@2.1.0-beta2');\n  jspm.import('bootstrap@3.0.1');\n```\n\nGenerally it is advised to write import/requires without any version or endpoint specified, and then use the package map configuration to set the endpoint and minor version.\n\nThis provides the most flexibility.\n\nFor example, in config.js:\n\n```javascript\njspm.config({\n  baseURL: '/lib',\n    map: {\n      'jquery': 'jquery@2.1',\n      'bootstrap': 'github:twbs/bootstrap@3.0',\n      'underscore': 'npm:underscore@1.5'\n    }\n  }\n});\n```\n\n### Installing Libraries Locally\n\nWhile the CDN endpoints make it very convenient to create and load modules without the friction of installation, it is easy to switch to installing packages locally at any time.\n\nWith the [jspm CLI](https://github.com/jspm/jspm-cli), any endpoint package or registry package can be directly installed:\n\n```\n  jspm install jquery bootstrap underscore\n```\n\nThe CLI will then update the `config.js` configuration file, as well as the `package.json` and all packages will then be loaded locally from the same server.\n\nTo get started with the CLI, [follow the guide at the jspm CLI page](https://github.com/jspm/jspm-cli).\n\n### Package Configuration\n\nAll other configuration in jspm is package-specific to ensure complete configuration modularity.\n\n**Package configuration is injected automatically from the package.json file by both the CDN and the [jspm CLI](https://github.com/jspm/jspm-cli) when installing packages locally.**\n\nThis configuration allows for easy usage of external packages without having to manually set up complex configuration.\n\nThe package-specific configuration options set the _main entry point_, _module format_, _map_ and _shim_.\n\nFor example, here is the package configuration that is injected when downloading Bootstrap:\n\n```javascript\n  jspm.config({\n    packages: {\n      'github:twbs/bootstrap@3.0.1': {\n        main: 'js/bootstrap',\n        format: 'global',\n        shim: {\n          'js/bootstrap': ['jquery']\n        }\n      }\n    }\n  });\n```\n\nMap configuration can also be set at the package level, allowing for dependency version support and avoiding name conflicts in dependencies.\n\n[Read more about configuring external packages for jspm here.](https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm).\n\n#### Main Entry Point\n\nThis sets the _main entry point_ for the package. When the package is requested directly by name, eg:\n\n```javascript\n  jspm.import('bootstrap')\n```\n\nthis will then load `js/bootstrap.js`, as if we had written:\n\n```javascript\n  jspm.import('bootstrap/js/bootstrap')\n```\n\n#### Format\n\njspm automatically detects the module format of files using regular expression detection techniques, but this comes with processing cost and perhaps the detected format may not be the format intended.\n\nSetting the `format` property for a package will disable any detection and ensure that the module files are treated accordingly.\n\nThe options for format are:\n* `es6`\n* `amd`\n* `cjs`\n* `global`\n\n#### Map Configuration\n\nMap configuration set within a package will only apply to dependencies of that package.\n\nThis is useful when two packages may refer to the same module name, but expect different underlying versions or implementations.\n\n#### Shim Configuration\n\nShim configuration allows dependencies for global scripts to be enforced, just like RequireJS.\n\nIn the example,\n```\n  jspm.import('bootstrap/js/bootstrap')\n```\n\nwill load Bootstrap only after loading jQuery.\n\nMore advanced shim configuration can also be set, allowing the exporter to be defined as well:\n\n```javascript\n  jspm.config({\n    packages: {\n      'github:components/jquery@2.0.3': {\n        shim: {\n          'lib/jquery': {\n            exports: 'jQuery'\n          }\n        }\n      },\n      'github:some/jquery-plugin@1.1.1': {\n        shim: {\n          imports: ['./jquery'],\n          exports: 'jQuery.somePlugin'\n        }\n      }\n  });\n```\n\n### Cache Busting\n\nWhen developing locally, you may want to automatically cache bust the local URLs.\n\nFor this, set the `urlArgs` configuration option:\n\n```javascript\n  jspm.config({\n    urlArgs: '?bust=' + new Date().getTime()\n  });\n\n  jspm.import('./test');  // requests [baseURL]/test.js?bust=1383745775497\n```\n\n### Plugins\n\nSupported Plugins:\n\n* CSS `jspm.import('my/file.css!')`\n* Image `jspm.import('some/image.png!image')`\n* JSON `jspm.import('some/data.json!')`\n* Text `jspm.import('some/text.txt!text')`\n* WebFont `jspm.import('#google Port Lligat Slab, Droid Sans !font')`\n\nThe name of the plugin is by default the file extension before the `!`, or the name can be provided after with `!pluginName` when the plugin name is not the same as the resource extension name.\n\nBy default, plugins are loaded from the [jspm registry](https://github.com/jspm/registry), as the exact plugin name.\n\nTo submit a plugin, create a pull request on the registry page.\n\n### Custom Plugins\n\nCustom transpiler plugins allow for loading templates or languages that compile to JavaScript.\n\nThese are different from RequireJS in that they are extension-based plugin names:\n\n```javascript\n  jspm.import('some/module.coffee!')\n```\n\nWhere `some/module.coffee` is a CoffeeScript file.\n\nThe plugin name can also be specified if not identical to the extension:\n\n```javascript\n  jspm.import('some/module.cs!coffee');\n```\n\nThe plugin itself is loaded from the resource name `[pluginname]`. This name itself can be mapped with standard configuration:\n\n```javascript\n  jspm.config({\n    map: {\n      'coffee': 'my/custom/coffee/plugin',\n    }\n  });\n```\n\nOtherwise, plugins are loaded from the registry.\n\n### Writing a Plugin\n\n[baseURL]/my/custom/coffee/plugin.js:\n```javascript\n  var CoffeeScript = require('./coffee-script');\n\n  module.exports = function(name, url, fetch, callback, errback) {\n    fetch(url, function(source) {\n      callback(CoffeeScript.compile(source));\n    }, errback);\n  }\n```\n\nNote the plugin here is written as CommonJS for an example only - any module format will work.\n\nLicense\n---\n\nMIT\n\n","_attachments":{},"readmeFilename":"README.md","bugs":{"url":"https://github.com/jspm/jspm-loader/issues"},"license":"MIT"}