Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit d9697df

Browse files
committed
0.8.1
1 parent 1f59f3f commit d9697df

7 files changed

+27
-32
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ See the [demo folder](https://github.com/ModuleLoader/es6-module-loader/blob/mas
1717

1818
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).
1919

20-
_The current version is tested against **[Traceur 0.0.55](https://github.com/google/traceur-compiler/tree/0.0.55)**._
20+
_The current version is tested against **[Traceur 0.0.56](https://github.com/google/traceur-compiler/tree/0.0.56)**._
2121

2222
_Note the ES6 module specification is still in draft, and subject to change._
2323

2424
### Basic Use
2525

26-
Download both [es6-module-loader.js](https://github.com/ModuleLoader/es6-module-loader/v0.8.0/dist/es6-module-loader.js) and traceur.js into the same folder.
26+
Download both [es6-module-loader.js](https://github.com/ModuleLoader/es6-module-loader/v0.8.1/dist/es6-module-loader.js) and traceur.js into the same folder.
2727

28-
If using ES6 syntax (optional), include [`traceur.js`](https://github.com/jmcriffey/bower-traceur/0.0.55/traceur.js) in the page first then include `es6-module-loader.js`:
28+
If using ES6 syntax (optional), include [`traceur.js`](https://github.com/jmcriffey/bower-traceur/0.0.56/traceur.js) in the page first then include `es6-module-loader.js`:
2929

3030
```html
3131
<script src="traceur.js"></script>
@@ -177,7 +177,7 @@ A basic example of using this extension with a build would be the following:
177177
traceur --out app-build.js app/app.js --modules=instantiate
178178
```
179179

180-
2. If using additional ES6 features apart from modules syntax, load [`traceur-runtime.js`](https://github.com/jmcriffey/bower-traceur/0.0.55/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:
180+
2. If using additional ES6 features apart from modules syntax, load [`traceur-runtime.js`](https://github.com/jmcriffey/bower-traceur/0.0.56/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:
181181

182182
```html
183183
<script src="traceur-runtime.js"></script>

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "es6-module-loader",
3-
"version": "0.8.0",
3+
"version": "0.8.1",
44
"description": "An ES6 Module Loader polyfill based on the latest spec.",
55
"homepage": "https://github.com/ModuleLoader/es6-module-loader",
66
"main": "dist/es6-module-loader-sans-promises.js",
77
"dependencies": {
8-
"traceur": "0.0.55"
8+
"traceur": "0.0.56"
99
},
1010
"keywords": [
1111
"es6",

dist/es6-module-loader-sans-promises.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,8 @@ function logloads(loads) {
10651065
var compiler = new traceur.Compiler();
10661066
var options = System.traceurOptions || {};
10671067
options.modules = 'instantiate';
1068+
options.sourceMaps = true;
1069+
options.filename = load.address;
10681070
var output = compiler.stringToTree({content: load.source, options: options});
10691071
checkForErrors(output);
10701072

@@ -1073,6 +1075,7 @@ function logloads(loads) {
10731075

10741076
output = compiler.treeToString(output);
10751077
checkForErrors(output);
1078+
10761079
var source = output.js;
10771080
var sourceMap = output.generatedSourceMap;
10781081

dist/es6-module-loader-sans-promises.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/es6-module-loader.js

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -820,37 +820,26 @@ define(function() {
820820
};
821821

822822
/**
823-
* Abstract base for handler that delegates to another handler
823+
* Wrap another handler and force it into a future stack
824824
* @param {object} handler
825825
* @constructor
826826
*/
827-
function Delegating(handler) {
827+
function Async(handler) {
828828
this.handler = handler;
829829
}
830830

831-
inherit(Handler, Delegating);
831+
inherit(Handler, Async);
832832

833-
Delegating.prototype._report = function(context) {
834-
this.join()._report(context);
833+
Async.prototype.when = function(continuation) {
834+
tasks.enqueue(new ContinuationTask(continuation, this));
835835
};
836836

837-
Delegating.prototype._unreport = function() {
838-
this.join()._unreport();
837+
Async.prototype._report = function(context) {
838+
this.join()._report(context);
839839
};
840840

841-
/**
842-
* Wrap another handler and force it into a future stack
843-
* @param {object} handler
844-
* @constructor
845-
*/
846-
function Async(handler) {
847-
Delegating.call(this, handler);
848-
}
849-
850-
inherit(Delegating, Async);
851-
852-
Async.prototype.when = function(continuation) {
853-
tasks.enqueue(new ContinuationTask(continuation, this));
841+
Async.prototype._unreport = function() {
842+
this.join()._unreport();
854843
};
855844

856845
/**
@@ -2239,6 +2228,8 @@ function logloads(loads) {
22392228
var compiler = new traceur.Compiler();
22402229
var options = System.traceurOptions || {};
22412230
options.modules = 'instantiate';
2231+
options.sourceMaps = true;
2232+
options.filename = load.address;
22422233
var output = compiler.stringToTree({content: load.source, options: options});
22432234
checkForErrors(output);
22442235

@@ -2247,6 +2238,7 @@ function logloads(loads) {
22472238

22482239
output = compiler.treeToString(output);
22492240
checkForErrors(output);
2241+
22502242
var source = output.js;
22512243
var sourceMap = output.generatedSourceMap;
22522244

dist/es6-module-loader.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "es6-module-loader",
33
"description": "An ES6 Module Loader shim",
4-
"version": "0.8.0",
4+
"version": "0.8.1",
55
"homepage": "https://github.com/ModuleLoader/es6-module-loader",
66
"author": {
77
"name": "Guy Bedford, Luke Hoban, Addy Osmani",
@@ -41,7 +41,7 @@
4141
"test": "cd test && node test"
4242
},
4343
"dependencies": {
44-
"traceur": "0.0.55",
44+
"traceur": "0.0.56",
4545
"when": "^3.4.2"
4646
}
4747
}

0 commit comments

Comments
 (0)