Skip to content

Commit

Permalink
Merge pull request ModuleLoader#396 from probins/patch-1
Browse files Browse the repository at this point in the history
Updates to readme
  • Loading branch information
guybedford committed Jun 11, 2015
2 parents c0f66ad + c424327 commit ea56363
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This project implements dynamic module loading through `System` exactly to the p
* Can be used as a [tracing tool](docs/tracing-api.md) for static analysis of modules.
* Supports IE8+, with IE9+ support for ES6 development without pre-compilation.
* The minified production loader is under 5KB minified and gzipped, making it suitable for production use, provided that modules are [built into ES5 making them independent of Traceur](docs/production-workflows.md).
* Supports declaring modules with `<script type="module">`, the precursor of the proposed [`<module>` tag](https://github.com/dherman/module-tag/).

For an overview of build workflows, [see the production guide](docs/production-workflows.md).

Expand Down Expand Up @@ -74,6 +75,10 @@ and load the module dynamically in the browser

The dynamic loader returns a `Module` object, which contains getters for the named exports (in this case, `q`).

See the [demo folder](https://github.com/ModuleLoader/es6-module-loader/blob/master/demo/index.html) in this repo for a working example demonstrating module loading in the browser both with `System.import` and with the module-type script tag.

Although `System.import()` does not support the import of multiple modules defined in an array, because `System.import()` returns a Promise, this can be achieved by creating an array of `System.import`s and using `Promise.all()`.

#### Setting transpilation options

If using Traceur, these can be set with:
Expand Down Expand Up @@ -109,8 +114,6 @@ As well as defining `window.System`, this polyfill provides support for the `<sc

Because it is only possible to load ES6 modules with this tag, it is not suitable for production use in this way.

See the [demo folder](https://github.com/ModuleLoader/es6-module-loader/blob/master/demo/index.html) in this repo for a working example demonstrating module loading in the browser both with `System.import` and with the module-type script tag.

#### NodeJS Use

```
Expand Down

0 comments on commit ea56363

Please sign in to comment.