Skip to content

Commit 5127d4f

Browse files
chore(all): prepare release 0.6.0
1 parent bfcd292 commit 5127d4f

File tree

7 files changed

+73
-27
lines changed

7 files changed

+73
-27
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-framework",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.",
55
"keywords": [
66
"aurelia",

dist/amd/aurelia.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define(["exports", "aurelia-logging", "aurelia-dependency-injection", "aurelia-l
88
var ResourceCoordinator = _aureliaTemplating.ResourceCoordinator;
99
var ViewSlot = _aureliaTemplating.ViewSlot;
1010
var ResourceRegistry = _aureliaTemplating.ResourceRegistry;
11+
var CompositionEngine = _aureliaTemplating.CompositionEngine;
1112
var Plugins = _plugins.Plugins;
1213

1314

@@ -71,19 +72,25 @@ define(["exports", "aurelia-logging", "aurelia-dependency-injection", "aurelia-l
7172

7273
Aurelia.prototype.setRoot = function (root, applicationHost) {
7374
var _this2 = this;
75+
var compositionEngine, instruction = {};
76+
7477
if (!applicationHost || typeof applicationHost == "string") {
7578
this.host = document.getElementById(applicationHost || "applicationHost") || document.body;
7679
} else {
7780
this.host = applicationHost;
7881
}
7982

8083
this.host.aurelia = this;
84+
this.container.registerInstance(Element, this.host);
85+
86+
compositionEngine = this.container.get(CompositionEngine);
87+
instruction.viewModel = root;
88+
instruction.viewSlot = new ViewSlot(this.host, true);
89+
instruction.container = instruction.childContainer = this.container;
8190

82-
return this.container.get(ResourceCoordinator).loadElement(root).then(function (type) {
83-
_this2.root = type.create(_this2.container);
84-
var slot = new ViewSlot(_this2.host, true);
85-
slot.swap(_this2.root.view);
86-
slot.attached();
91+
return compositionEngine.compose(instruction).then(function (root) {
92+
_this2.root = root;
93+
instruction.viewSlot.attached();
8794
return _this2;
8895
});
8996
};

dist/commonjs/aurelia.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var BindingLanguage = require("aurelia-templating").BindingLanguage;
1414
var ResourceCoordinator = require("aurelia-templating").ResourceCoordinator;
1515
var ViewSlot = require("aurelia-templating").ViewSlot;
1616
var ResourceRegistry = require("aurelia-templating").ResourceRegistry;
17+
var CompositionEngine = require("aurelia-templating").CompositionEngine;
1718
var Plugins = require("./plugins").Plugins;
1819

1920

@@ -77,19 +78,25 @@ Aurelia.prototype.start = function () {
7778

7879
Aurelia.prototype.setRoot = function (root, applicationHost) {
7980
var _this2 = this;
81+
var compositionEngine, instruction = {};
82+
8083
if (!applicationHost || typeof applicationHost == "string") {
8184
this.host = document.getElementById(applicationHost || "applicationHost") || document.body;
8285
} else {
8386
this.host = applicationHost;
8487
}
8588

8689
this.host.aurelia = this;
90+
this.container.registerInstance(Element, this.host);
91+
92+
compositionEngine = this.container.get(CompositionEngine);
93+
instruction.viewModel = root;
94+
instruction.viewSlot = new ViewSlot(this.host, true);
95+
instruction.container = instruction.childContainer = this.container;
8796

88-
return this.container.get(ResourceCoordinator).loadElement(root).then(function (type) {
89-
_this2.root = type.create(_this2.container);
90-
var slot = new ViewSlot(_this2.host, true);
91-
slot.swap(_this2.root.view);
92-
slot.attached();
97+
return compositionEngine.compose(instruction).then(function (root) {
98+
_this2.root = root;
99+
instruction.viewSlot.attached();
93100
return _this2;
94101
});
95102
};

dist/es6/aurelia.js

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import * as LogManager from 'aurelia-logging';
22
import {Container} from 'aurelia-dependency-injection';
33
import {Loader} from 'aurelia-loader';
4-
import {BindingLanguage, ResourceCoordinator, ViewSlot, ResourceRegistry} from 'aurelia-templating';
4+
import {
5+
BindingLanguage,
6+
ResourceCoordinator,
7+
ViewSlot,
8+
ResourceRegistry,
9+
CompositionEngine
10+
} from 'aurelia-templating';
511
import {Plugins} from './plugins';
612

713
var logger = LogManager.getLogger('aurelia');
@@ -62,21 +68,26 @@ export class Aurelia {
6268
}
6369

6470
setRoot(root, applicationHost){
71+
var compositionEngine, instruction = {};
72+
6573
if (!applicationHost || typeof applicationHost == 'string') {
6674
this.host = document.getElementById(applicationHost || 'applicationHost') || document.body;
6775
} else {
6876
this.host = applicationHost;
6977
}
7078

7179
this.host.aurelia = this;
80+
this.container.registerInstance(Element, this.host);
81+
82+
compositionEngine = this.container.get(CompositionEngine);
83+
instruction.viewModel = root;
84+
instruction.viewSlot = new ViewSlot(this.host, true);
85+
instruction.container = instruction.childContainer = this.container;
7286

73-
return this.container.get(ResourceCoordinator)
74-
.loadElement(root).then(type => {
75-
this.root = type.create(this.container);
76-
var slot = new ViewSlot(this.host, true);
77-
slot.swap(this.root.view);
78-
slot.attached();
79-
return this;
80-
});
87+
return compositionEngine.compose(instruction).then(root => {
88+
this.root = root;
89+
instruction.viewSlot.attached();
90+
return this;
91+
});
8192
}
8293
}

dist/system/aurelia.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
System.register(["aurelia-logging", "aurelia-dependency-injection", "aurelia-loader", "aurelia-templating", "./plugins"], function (_export) {
22
"use strict";
33

4-
var LogManager, Container, Loader, BindingLanguage, ResourceCoordinator, ViewSlot, ResourceRegistry, Plugins, logger, Aurelia;
4+
var LogManager, Container, Loader, BindingLanguage, ResourceCoordinator, ViewSlot, ResourceRegistry, CompositionEngine, Plugins, logger, Aurelia;
55
return {
66
setters: [function (_aureliaLogging) {
77
LogManager = _aureliaLogging;
@@ -14,6 +14,7 @@ System.register(["aurelia-logging", "aurelia-dependency-injection", "aurelia-loa
1414
ResourceCoordinator = _aureliaTemplating.ResourceCoordinator;
1515
ViewSlot = _aureliaTemplating.ViewSlot;
1616
ResourceRegistry = _aureliaTemplating.ResourceRegistry;
17+
CompositionEngine = _aureliaTemplating.CompositionEngine;
1718
}, function (_plugins) {
1819
Plugins = _plugins.Plugins;
1920
}],
@@ -77,19 +78,25 @@ System.register(["aurelia-logging", "aurelia-dependency-injection", "aurelia-loa
7778

7879
Aurelia.prototype.setRoot = function (root, applicationHost) {
7980
var _this2 = this;
81+
var compositionEngine, instruction = {};
82+
8083
if (!applicationHost || typeof applicationHost == "string") {
8184
this.host = document.getElementById(applicationHost || "applicationHost") || document.body;
8285
} else {
8386
this.host = applicationHost;
8487
}
8588

8689
this.host.aurelia = this;
90+
this.container.registerInstance(Element, this.host);
91+
92+
compositionEngine = this.container.get(CompositionEngine);
93+
instruction.viewModel = root;
94+
instruction.viewSlot = new ViewSlot(this.host, true);
95+
instruction.container = instruction.childContainer = this.container;
8796

88-
return this.container.get(ResourceCoordinator).loadElement(root).then(function (type) {
89-
_this2.root = type.create(_this2.container);
90-
var slot = new ViewSlot(_this2.host, true);
91-
slot.swap(_this2.root.view);
92-
slot.attached();
97+
return compositionEngine.compose(instruction).then(function (root) {
98+
_this2.root = root;
99+
instruction.viewSlot.attached();
93100
return _this2;
94101
});
95102
};

doc/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 0.6.0 (2015-01-07)
2+
3+
4+
#### Bug Fixes
5+
6+
* **aurelia:** directly use app container to create root view model ([d86665b3](http://github.com/aurelia/framework/commit/d86665b390dbfa65f8c53c148adfc740d7e8ebb2))
7+
* **package:** update dependencies to latest ([bfcd292e](http://github.com/aurelia/framework/commit/bfcd292e5c26bde6b7064e866db566201f280b4f))
8+
9+
10+
#### Features
11+
12+
* **aurelia:** set root sets element in container and uses composition engine ([9f6fa60d](http://github.com/aurelia/framework/commit/9f6fa60d27dc7e9d418970925df2fc23514c1422))
13+
14+
115
## 0.5.0 (2015-01-06)
216

317

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-framework",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.",
55
"keywords": [
66
"aurelia",

0 commit comments

Comments
 (0)