Skip to content

Commit

Permalink
0.7.0 module syntax update
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Aug 6, 2014
1 parent f98d0db commit 348c97c
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Basic Configuration

### Setup

Download [`es6-module-loader.js`](https://github.com/ModuleLoader/es6-module-loader/blob/v0.7.2/dist/es6-module-loader.js) and [`traceur.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.51/traceur.js) and locate them in the same folder as `system.js` from this repo.
Download [`es6-module-loader.js`](https://github.com/ModuleLoader/es6-module-loader/blob/v0.8.0/dist/es6-module-loader.js) and [`traceur.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.55/traceur.js) and locate them in the same folder as `system.js` from this repo.

We then include `dist/system.js` with a script tag in the page.

Expand Down Expand Up @@ -334,7 +334,7 @@ This will compile all ES6 files in the directory `app` into corresponding ES5 `S

The `instantiate` modules option writes the modules out using a `System.register` call, which is supported by SystemJS.

Then include [`traceur-runtime.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.51/traceur-runtimr.js) (also found inside traceur's `bin` folder when installed via npm) before es6-module-loader.js:
Then include [`traceur-runtime.js`](https://raw.githubusercontent.com/jmcriffey/bower-traceur/0.0.55/traceur-runtimr.js) (also found inside traceur's `bin` folder when installed via npm) before es6-module-loader.js:

```html
<script src="traceur-runtime.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "system.js",
"version": "0.6.8",
"version": "0.7.0",
"dependencies": {
"es6-module-loader": "~0.7.2"
"es6-module-loader": "~0.8.0"
},
"devDependencies": {
"qunit": "~1.12.0"
Expand Down
8 changes: 4 additions & 4 deletions dist/system-production-csp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1402,14 +1402,12 @@ function amd(loader) {
global.exports = oldExports;
}

if (loader.amdDefine !== false)
createDefine(loader);
generateDefine(loader);

if (loader.scriptLoader) {
var loaderFetch = loader.fetch;
loader.fetch = function(load) {
if (loader.amdDefine !== false)
createDefine(this);
createDefine(this);
return loaderFetch.call(this, load);
}
}
Expand Down Expand Up @@ -1444,6 +1442,8 @@ function amd(loader) {
throw e;
}

removeDefine(loader);

if (!anonDefine && !defineBundle && !isNode)
throw "AMD module " + load.name + " did not define";

Expand Down
2 changes: 1 addition & 1 deletion dist/system-production-csp.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -1340,14 +1340,12 @@ function amd(loader) {
global.exports = oldExports;
}

if (loader.amdDefine !== false)
createDefine(loader);
generateDefine(loader);

if (loader.scriptLoader) {
var loaderFetch = loader.fetch;
loader.fetch = function(load) {
if (loader.amdDefine !== false)
createDefine(this);
createDefine(this);
return loaderFetch.call(this, load);
}
}
Expand Down Expand Up @@ -1382,6 +1380,8 @@ function amd(loader) {
throw e;
}

removeDefine(loader);

if (!anonDefine && !defineBundle && !isNode)
throw "AMD module " + load.name + " did not define";

Expand Down
2 changes: 1 addition & 1 deletion dist/system.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "systemjs",
"version": "0.6.8",
"version": "0.7.0",
"description": "System loader extension for flexible AMD & CommonJS support",
"main": "dist/system.js",
"repository": {
Expand All @@ -10,7 +10,7 @@
"author": "Guy Bedford",
"license": "MIT",
"dependencies": {
"es6-module-loader": "~0.7.2"
"es6-module-loader": "~0.8.0"
},
"devDependencies": {
"qunit": "^0.6.2",
Expand Down
2 changes: 1 addition & 1 deletion test/tests/module.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module default3 from "./default3";
import * as default3 from "./default3";

export var test = default3.default;

0 comments on commit 348c97c

Please sign in to comment.