You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 13, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,28 @@
2
2
3
3
Dynamically loads ES6 modules in NodeJS and current browsers.
4
4
5
-
* Implemented exactly to the April 27 2014 ES6 specification draft.
5
+
* Implemented exactly to the May 22 2014 ES6 specification draft.
6
6
* Provides an asynchronous loader (`System.import`) to [dynamically load ES6 modules](#basic-use).
7
7
* Uses [Traceur](https://github.com/google/traceur-compiler) for compiling ES6 modules and syntax into ES5 in the browser with source map support.
8
8
* Fully supports [ES6 circular references and bindings](#circular-references--bindings).
9
9
* Polyfills ES6 Promises in the browser with a bundled [es6-promise](https://github.com/jakearchibald/es6-promise) implementation.
10
10
*[Compatible with NodeJS](#nodejs-usage) allowing for server-side module loading and tracing extensions.
11
11
* Supports ES6 module loading in IE9+, and dynamic module formats in IE8+.
12
-
* The complete combined polyfill comes to 7KB minified and gzipped, making it suitable for production use, provided that modules are [built into ES5 making them independent of Traceur](#moving-to-production).
12
+
* The complete combined polyfill comes to 8.7KB minified and gzipped, making it suitable for production use, provided that modules are [built into ES5 making them independent of Traceur](#moving-to-production).
13
13
14
14
For an overview of build workflows, [see the production guide](#moving-to-production).
15
15
16
16
See the [demo folder](https://github.com/ModuleLoader/es6-module-loader/blob/master/demo/index.html) in this repo for a working example demonstrating both module loading the module tag in the browser.
17
17
18
18
For an example of a universal module loader based on this polyfill for loading AMD, CommonJS and globals, see [SystemJS](https://github.com/systemjs/systemjs).
19
19
20
-
_The current version is tested against **[Traceur 0.0.42](https://github.com/google/traceur-compiler/tree/0.0.42)**._
20
+
_The current version is tested against **[Traceur 0.0.45](https://github.com/google/traceur-compiler/tree/0.0.45)**._
21
21
22
22
_Note the ES6 module specification is still in draft, and subject to change._
23
23
24
24
### Basic Use
25
25
26
-
Download both [es6-module-loader.js](https://raw.githubusercontent.com/ModuleLoader/es6-module-loader/v0.6.0/dist/es6-module-loader.js) and [traceur.js](https://raw.githubusercontent.com/google/traceur-compiler/traceur@0.0.42/bin/traceur.js) into the same folder.
26
+
Download both [es6-module-loader.js](https://raw.githubusercontent.com/ModuleLoader/es6-module-loader/v0.7.0/dist/es6-module-loader.js) and [traceur.js](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.45/traceur.js) into the same folder.
27
27
28
28
If using ES6 syntax (optional), include `traceur.js` in the page first then include `es6-module-loader.js`:
29
29
@@ -181,7 +181,7 @@ A basic example of using this extension with a build would be the following:
2. If using additional ES6 features apart from modules syntax, load `traceur-runtime.js` (included in the `bin` folder when installing Traceur through Bower or npm). Then include `es6-module-loader.js` and then apply the register extension before doing the import or loading the bundle as a script:
184
+
2. If using additional ES6 features apart from modules syntax, load [`traceur-runtime.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.45/traceur-runtime.js) (also included in the `bin` folder when installing Traceur through Bower or npm). Then include `es6-module-loader.js` and then apply the register extension before doing the import or loading the bundle as a script:
185
185
186
186
```html
187
187
<scriptsrc="traceur-runtime.js"></script>
@@ -208,6 +208,9 @@ A basic example of using this extension with a build would be the following:
208
208
</script>
209
209
```
210
210
211
+
* Note that `app-build.js` must be at the base-level for this to work.
212
+
* Also, the name we import, `app/app` must be the same name given to Traceur's compiler.
213
+
211
214
#### Building into separate files
212
215
213
216
We can also build separate files with:
@@ -224,7 +227,7 @@ With the above, we can load from the separate files identical to loading ES6.
224
227
npm install es6-module-loader
225
228
```
226
229
227
-
For use in NodeJS, the `Module`, `LoaderPolyfill` and `System` globals are provided as exports:
230
+
For use in NodeJS, the `Loader` and `System` globals are provided as exports:
0 commit comments