From edf2b5f8e5a47984219e2be26d7b762b9d7eab7c Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Mon, 26 Oct 2015 21:06:12 -0400 Subject: [PATCH 001/539] fix(all): update to work with latest TemplatingEngine --- src/aurelia.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/aurelia.js b/src/aurelia.js index 6189ebf9..8429a7ee 100644 --- a/src/aurelia.js +++ b/src/aurelia.js @@ -3,7 +3,7 @@ import 'core-js'; import * as TheLogManager from 'aurelia-logging'; import {Container} from 'aurelia-dependency-injection'; import {Loader} from 'aurelia-loader'; -import {BindingLanguage, ViewEngine, ViewSlot, ViewResources, CompositionEngine, Animator} from 'aurelia-templating'; +import {BindingLanguage, ViewSlot, ViewResources, TemplatingEngine} from 'aurelia-templating'; import {DOM, PLATFORM} from 'aurelia-pal'; import {FrameworkConfiguration} from './framework-configuration'; @@ -81,10 +81,6 @@ export class Aurelia { throw new Error(message); } - if (!this.container.hasResolver(Animator)) { - Animator.configureDefault(this.container); - } - this.logger.info('Aurelia Started'); let evt = DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true }); DOM.dispatchEvent(evt); @@ -102,8 +98,8 @@ export class Aurelia { this._configureHost(applicationHost); return new Promise(resolve => { - let viewEngine = this.container.get(ViewEngine); - this.root = viewEngine.enhance(this.container, this.host, this.resources, bindingContext); + let engine = this.container.get(TemplatingEngine); + this.root = engine.enhance({container: this.container, element: this.host, resources: this.resources, bindingContext: bindingContext}); this.root.attached(); this._onAureliaComposed(); return this; @@ -117,18 +113,18 @@ export class Aurelia { * @return Returns a Promise of the current Aurelia instance. */ setRoot(root: string = 'app', applicationHost: string | Element = null): Promise { - let compositionEngine; + let engine; let instruction = {}; this._configureHost(applicationHost); - compositionEngine = this.container.get(CompositionEngine); + engine = this.container.get(TemplatingEngine); instruction.viewModel = root; instruction.container = instruction.childContainer = this.container; instruction.viewSlot = this.hostSlot; instruction.host = this.host; - return compositionEngine.compose(instruction).then(r => { + return engine.compose(instruction).then(r => { this.root = r; instruction.viewSlot.attached(); this._onAureliaComposed(); From 5eeaef0e5807dcde28bb87c8856d5586bed4750c Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Tue, 10 Nov 2015 11:02:56 -0500 Subject: [PATCH 002/539] chore(package): update dependencies --- bower.json | 18 ++++----- config.js | 108 ++++++++++++++++++++++++++------------------------- package.json | 26 ++++++------- 3 files changed, 77 insertions(+), 75 deletions(-) diff --git a/bower.json b/bower.json index 53be3392..bfa4000e 100644 --- a/bower.json +++ b/bower.json @@ -17,15 +17,15 @@ "url": "http://github.com/aurelia/framework" }, "dependencies": { - "aurelia-binding": "^0.10.0", - "aurelia-dependency-injection": "^0.11.0", - "aurelia-loader": "^0.10.0", - "aurelia-logging": "^0.8.0", - "aurelia-metadata": "^0.9.0", - "aurelia-pal": "^0.2.0", - "aurelia-path": "^0.10.0", - "aurelia-task-queue": "^0.8.0", - "aurelia-templating": "^0.16.0", + "aurelia-binding": "^0.11.0", + "aurelia-dependency-injection": "^0.12.0", + "aurelia-loader": "^0.11.0", + "aurelia-logging": "^0.9.0", + "aurelia-metadata": "^0.10.0", + "aurelia-pal": "^0.3.0", + "aurelia-path": "^0.11.0", + "aurelia-task-queue": "^0.9.0", + "aurelia-templating": "^0.17.0", "core-js": "zloirock/core-js" } } diff --git a/config.js b/config.js index dd240f57..8ef35648 100644 --- a/config.js +++ b/config.js @@ -14,59 +14,62 @@ System.config({ }, map: { - "aurelia-binding": "github:aurelia/binding@0.10.0", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", - "aurelia-loader": "github:aurelia/loader@0.10.0", - "aurelia-logging": "github:aurelia/logging@0.8.0", - "aurelia-metadata": "github:aurelia/metadata@0.9.0", - "aurelia-pal": "github:aurelia/pal@0.2.0", - "aurelia-pal-browser": "github:aurelia/pal-browser@0.2.0", - "aurelia-path": "github:aurelia/path@0.10.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", - "aurelia-templating": "github:aurelia/templating@0.16.0", + "aurelia-binding": "github:aurelia/binding@0.11.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.12.0", + "aurelia-loader": "github:aurelia/loader@0.11.0", + "aurelia-logging": "github:aurelia/logging@0.9.0", + "aurelia-metadata": "github:aurelia/metadata@0.10.0", + "aurelia-pal": "github:aurelia/pal@0.3.0", + "aurelia-pal-browser": "github:aurelia/pal-browser@0.3.0", + "aurelia-path": "github:aurelia/path@0.11.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.9.0", + "aurelia-templating": "github:aurelia/templating@0.17.0", "babel": "npm:babel-core@5.2.2", "babel-runtime": "npm:babel-runtime@5.2.2", - "core-js": "npm:core-js@1.2.1", - "github:aurelia/binding@0.10.0": { - "aurelia-metadata": "github:aurelia/metadata@0.9.0", - "aurelia-pal": "github:aurelia/pal@0.2.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", - "core-js": "npm:core-js@0.9.18" - }, - "github:aurelia/dependency-injection@0.11.0": { - "aurelia-logging": "github:aurelia/logging@0.8.0", - "aurelia-metadata": "github:aurelia/metadata@0.9.0", - "aurelia-pal": "github:aurelia/pal@0.2.0", - "core-js": "npm:core-js@0.9.18" - }, - "github:aurelia/loader@0.10.0": { - "aurelia-metadata": "github:aurelia/metadata@0.9.0", - "aurelia-path": "github:aurelia/path@0.10.0" - }, - "github:aurelia/metadata@0.9.0": { - "aurelia-pal": "github:aurelia/pal@0.2.0", - "core-js": "npm:core-js@0.9.18" - }, - "github:aurelia/pal-browser@0.2.0": { - "aurelia-pal": "github:aurelia/pal@0.2.0" - }, - "github:aurelia/task-queue@0.8.0": { - "aurelia-pal": "github:aurelia/pal@0.2.0" - }, - "github:aurelia/templating@0.16.0": { - "aurelia-binding": "github:aurelia/binding@0.10.0", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", - "aurelia-loader": "github:aurelia/loader@0.10.0", - "aurelia-logging": "github:aurelia/logging@0.8.0", - "aurelia-metadata": "github:aurelia/metadata@0.9.0", - "aurelia-pal": "github:aurelia/pal@0.2.0", - "aurelia-path": "github:aurelia/path@0.10.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", - "core-js": "npm:core-js@0.9.18" + "core-js": "npm:core-js@1.2.6", + "github:aurelia/binding@0.11.0": { + "aurelia-metadata": "github:aurelia/metadata@0.10.0", + "aurelia-pal": "github:aurelia/pal@0.3.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.9.0", + "core-js": "npm:core-js@1.2.6" + }, + "github:aurelia/dependency-injection@0.12.0": { + "aurelia-logging": "github:aurelia/logging@0.9.0", + "aurelia-metadata": "github:aurelia/metadata@0.10.0", + "aurelia-pal": "github:aurelia/pal@0.3.0", + "core-js": "npm:core-js@1.2.6" + }, + "github:aurelia/loader@0.11.0": { + "aurelia-metadata": "github:aurelia/metadata@0.10.0", + "aurelia-path": "github:aurelia/path@0.11.0" + }, + "github:aurelia/metadata@0.10.0": { + "aurelia-pal": "github:aurelia/pal@0.3.0", + "core-js": "npm:core-js@1.2.6" + }, + "github:aurelia/pal-browser@0.3.0": { + "aurelia-pal": "github:aurelia/pal@0.3.0" + }, + "github:aurelia/task-queue@0.9.0": { + "aurelia-pal": "github:aurelia/pal@0.3.0" + }, + "github:aurelia/templating@0.17.0": { + "aurelia-binding": "github:aurelia/binding@0.11.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.12.0", + "aurelia-loader": "github:aurelia/loader@0.11.0", + "aurelia-logging": "github:aurelia/logging@0.9.0", + "aurelia-metadata": "github:aurelia/metadata@0.10.0", + "aurelia-pal": "github:aurelia/pal@0.3.0", + "aurelia-path": "github:aurelia/path@0.11.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.9.0", + "core-js": "npm:core-js@1.2.6" }, "github:jspm/nodelibs-assert@0.1.0": { "assert": "npm:assert@1.3.0" }, + "github:jspm/nodelibs-path@0.1.0": { + "path-browserify": "npm:path-browserify@0.0.0" + }, "github:jspm/nodelibs-process@0.1.2": { "process": "npm:process@0.11.2" }, @@ -76,19 +79,18 @@ System.config({ "npm:assert@1.3.0": { "util": "npm:util@0.10.3" }, - "npm:core-js@0.9.18": { - "fs": "github:jspm/nodelibs-fs@0.1.2", - "process": "github:jspm/nodelibs-process@0.1.2", - "systemjs-json": "github:systemjs/plugin-json@0.1.0" - }, - "npm:core-js@1.2.1": { + "npm:core-js@1.2.6": { "fs": "github:jspm/nodelibs-fs@0.1.2", + "path": "github:jspm/nodelibs-path@0.1.0", "process": "github:jspm/nodelibs-process@0.1.2", "systemjs-json": "github:systemjs/plugin-json@0.1.0" }, "npm:inherits@2.0.1": { "util": "github:jspm/nodelibs-util@0.1.0" }, + "npm:path-browserify@0.0.0": { + "process": "github:jspm/nodelibs-process@0.1.2" + }, "npm:process@0.11.2": { "assert": "github:jspm/nodelibs-assert@0.1.0" }, diff --git a/package.json b/package.json index 8b1f8240..79932d8d 100644 --- a/package.json +++ b/package.json @@ -25,27 +25,27 @@ "lib": "dist/amd" }, "dependencies": { - "aurelia-binding": "github:aurelia/binding@^0.10.0", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.11.0", - "aurelia-loader": "github:aurelia/loader@^0.10.0", - "aurelia-logging": "github:aurelia/logging@^0.8.0", - "aurelia-metadata": "github:aurelia/metadata@^0.9.0", - "aurelia-pal": "github:aurelia/pal@^0.2.0", - "aurelia-path": "github:aurelia/path@^0.10.0", - "aurelia-task-queue": "github:aurelia/task-queue@^0.8.0", - "aurelia-templating": "github:aurelia/templating@^0.16.0", - "core-js": "npm:core-js@^0.9.5" + "aurelia-binding": "github:aurelia/binding@^0.11.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.12.0", + "aurelia-loader": "github:aurelia/loader@^0.11.0", + "aurelia-logging": "github:aurelia/logging@^0.9.0", + "aurelia-metadata": "github:aurelia/metadata@^0.10.0", + "aurelia-pal": "github:aurelia/pal@^0.3.0", + "aurelia-path": "github:aurelia/path@^0.11.0", + "aurelia-task-queue": "github:aurelia/task-queue@^0.9.0", + "aurelia-templating": "github:aurelia/templating@^0.17.0", + "core-js": "npm:core-js@^1.2.6" }, "devDependencies": { - "aurelia-pal-browser": "github:aurelia/pal-browser@^0.2.0", + "aurelia-pal-browser": "github:aurelia/pal-browser@^0.3.0", "babel": "npm:babel-core@^5.1.13", "babel-runtime": "npm:babel-runtime@^5.1.13", - "core-js": "npm:core-js@^0.9.5" + "core-js": "npm:core-js@^1.2.6" } }, "devDependencies": { "aurelia-tools": "^0.1.12", - "babel-dts-generator": "^0.2.9", + "babel-dts-generator": "^0.2.16", "babel-eslint": "^4.1.1", "conventional-changelog": "0.0.11", "del": "^1.1.0", From 9f0743a5c1d0b86f49f23138e63dabfb8aad89f0 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Tue, 10 Nov 2015 11:05:04 -0500 Subject: [PATCH 003/539] chore(all): prepare release 0.18.0 --- bower.json | 2 +- dist/amd/aurelia-framework.d.ts | 2 +- dist/amd/aurelia-framework.js | 16 +++++----------- dist/aurelia-framework.d.ts | 2 +- dist/aurelia-framework.js | 18 ++++++------------ dist/commonjs/aurelia-framework.d.ts | 2 +- dist/commonjs/aurelia-framework.js | 16 +++++----------- dist/es6/aurelia-framework.d.ts | 2 +- dist/es6/aurelia-framework.js | 18 ++++++------------ dist/system/aurelia-framework.d.ts | 2 +- dist/system/aurelia-framework.js | 22 +++++++--------------- doc/CHANGELOG.md | 8 ++++++++ doc/api.json | 14 +++++++------- package.json | 2 +- 14 files changed, 51 insertions(+), 75 deletions(-) diff --git a/bower.json b/bower.json index bfa4000e..85790709 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-framework", - "version": "0.17.0", + "version": "0.18.0", "description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-framework.d.ts b/dist/amd/aurelia-framework.d.ts index 0959411f..8052ac98 100644 --- a/dist/amd/aurelia-framework.d.ts +++ b/dist/amd/aurelia-framework.d.ts @@ -1,7 +1,7 @@ declare module 'aurelia-framework' { import 'core-js'; import * as TheLogManager from 'aurelia-logging'; - import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, CompositionEngine, Animator, templatingEngine } from 'aurelia-templating'; + import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, TemplatingEngine } from 'aurelia-templating'; import { join } from 'aurelia-path'; import { Container } from 'aurelia-dependency-injection'; import { Loader } from 'aurelia-loader'; diff --git a/dist/amd/aurelia-framework.js b/dist/amd/aurelia-framework.js index 0bdfca10..22eee4dd 100644 --- a/dist/amd/aurelia-framework.js +++ b/dist/amd/aurelia-framework.js @@ -286,12 +286,6 @@ define(['exports', 'core-js', 'aurelia-logging', 'aurelia-templating', 'aurelia- throw new Error(message); } - if (!_this5.container.hasResolver(_aureliaTemplating.Animator)) { - _aureliaTemplating.Animator.configureDefault(_this5.container); - } - - _aureliaTemplating.templatingEngine.initialize(_this5.container); - _this5.logger.info('Aurelia Started'); var evt = _aureliaPal.DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true }); _aureliaPal.DOM.dispatchEvent(evt); @@ -308,8 +302,8 @@ define(['exports', 'core-js', 'aurelia-logging', 'aurelia-templating', 'aurelia- this._configureHost(applicationHost); return new Promise(function (resolve) { - var viewEngine = _this6.container.get(_aureliaTemplating.ViewEngine); - _this6.root = viewEngine.enhance(_this6.container, _this6.host, _this6.resources, bindingContext); + var engine = _this6.container.get(_aureliaTemplating.TemplatingEngine); + _this6.root = engine.enhance({ container: _this6.container, element: _this6.host, resources: _this6.resources, bindingContext: bindingContext }); _this6.root.attached(); _this6._onAureliaComposed(); return _this6; @@ -322,18 +316,18 @@ define(['exports', 'core-js', 'aurelia-logging', 'aurelia-templating', 'aurelia- var root = arguments.length <= 0 || arguments[0] === undefined ? 'app' : arguments[0]; var applicationHost = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; - var compositionEngine = undefined; + var engine = undefined; var instruction = {}; this._configureHost(applicationHost); - compositionEngine = this.container.get(_aureliaTemplating.CompositionEngine); + engine = this.container.get(_aureliaTemplating.TemplatingEngine); instruction.viewModel = root; instruction.container = instruction.childContainer = this.container; instruction.viewSlot = this.hostSlot; instruction.host = this.host; - return compositionEngine.compose(instruction).then(function (r) { + return engine.compose(instruction).then(function (r) { _this7.root = r; instruction.viewSlot.attached(); _this7._onAureliaComposed(); diff --git a/dist/aurelia-framework.d.ts b/dist/aurelia-framework.d.ts index 0959411f..8052ac98 100644 --- a/dist/aurelia-framework.d.ts +++ b/dist/aurelia-framework.d.ts @@ -1,7 +1,7 @@ declare module 'aurelia-framework' { import 'core-js'; import * as TheLogManager from 'aurelia-logging'; - import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, CompositionEngine, Animator, templatingEngine } from 'aurelia-templating'; + import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, TemplatingEngine } from 'aurelia-templating'; import { join } from 'aurelia-path'; import { Container } from 'aurelia-dependency-injection'; import { Loader } from 'aurelia-loader'; diff --git a/dist/aurelia-framework.js b/dist/aurelia-framework.js index 9b0dcdde..5b6fe66a 100644 --- a/dist/aurelia-framework.js +++ b/dist/aurelia-framework.js @@ -1,6 +1,6 @@ import 'core-js'; import * as TheLogManager from 'aurelia-logging'; -import {ViewEngine,BindingLanguage,ViewSlot,ViewResources,CompositionEngine,Animator,templatingEngine} from 'aurelia-templating'; +import {ViewEngine,BindingLanguage,ViewSlot,ViewResources,TemplatingEngine} from 'aurelia-templating'; import {join} from 'aurelia-path'; import {Container} from 'aurelia-dependency-injection'; import {Loader} from 'aurelia-loader'; @@ -393,12 +393,6 @@ export class Aurelia { throw new Error(message); } - if (!this.container.hasResolver(Animator)) { - Animator.configureDefault(this.container); - } - - templatingEngine.initialize(this.container); - this.logger.info('Aurelia Started'); let evt = DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true }); DOM.dispatchEvent(evt); @@ -416,8 +410,8 @@ export class Aurelia { this._configureHost(applicationHost); return new Promise(resolve => { - let viewEngine = this.container.get(ViewEngine); - this.root = viewEngine.enhance(this.container, this.host, this.resources, bindingContext); + let engine = this.container.get(TemplatingEngine); + this.root = engine.enhance({container: this.container, element: this.host, resources: this.resources, bindingContext: bindingContext}); this.root.attached(); this._onAureliaComposed(); return this; @@ -431,18 +425,18 @@ export class Aurelia { * @return Returns a Promise of the current Aurelia instance. */ setRoot(root: string = 'app', applicationHost: string | Element = null): Promise { - let compositionEngine; + let engine; let instruction = {}; this._configureHost(applicationHost); - compositionEngine = this.container.get(CompositionEngine); + engine = this.container.get(TemplatingEngine); instruction.viewModel = root; instruction.container = instruction.childContainer = this.container; instruction.viewSlot = this.hostSlot; instruction.host = this.host; - return compositionEngine.compose(instruction).then(r => { + return engine.compose(instruction).then(r => { this.root = r; instruction.viewSlot.attached(); this._onAureliaComposed(); diff --git a/dist/commonjs/aurelia-framework.d.ts b/dist/commonjs/aurelia-framework.d.ts index 0959411f..8052ac98 100644 --- a/dist/commonjs/aurelia-framework.d.ts +++ b/dist/commonjs/aurelia-framework.d.ts @@ -1,7 +1,7 @@ declare module 'aurelia-framework' { import 'core-js'; import * as TheLogManager from 'aurelia-logging'; - import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, CompositionEngine, Animator, templatingEngine } from 'aurelia-templating'; + import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, TemplatingEngine } from 'aurelia-templating'; import { join } from 'aurelia-path'; import { Container } from 'aurelia-dependency-injection'; import { Loader } from 'aurelia-loader'; diff --git a/dist/commonjs/aurelia-framework.js b/dist/commonjs/aurelia-framework.js index 9d3cb38e..840bf4ea 100644 --- a/dist/commonjs/aurelia-framework.js +++ b/dist/commonjs/aurelia-framework.js @@ -303,12 +303,6 @@ var Aurelia = (function () { throw new Error(message); } - if (!_this5.container.hasResolver(_aureliaTemplating.Animator)) { - _aureliaTemplating.Animator.configureDefault(_this5.container); - } - - _aureliaTemplating.templatingEngine.initialize(_this5.container); - _this5.logger.info('Aurelia Started'); var evt = _aureliaPal.DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true }); _aureliaPal.DOM.dispatchEvent(evt); @@ -325,8 +319,8 @@ var Aurelia = (function () { this._configureHost(applicationHost); return new Promise(function (resolve) { - var viewEngine = _this6.container.get(_aureliaTemplating.ViewEngine); - _this6.root = viewEngine.enhance(_this6.container, _this6.host, _this6.resources, bindingContext); + var engine = _this6.container.get(_aureliaTemplating.TemplatingEngine); + _this6.root = engine.enhance({ container: _this6.container, element: _this6.host, resources: _this6.resources, bindingContext: bindingContext }); _this6.root.attached(); _this6._onAureliaComposed(); return _this6; @@ -339,18 +333,18 @@ var Aurelia = (function () { var root = arguments.length <= 0 || arguments[0] === undefined ? 'app' : arguments[0]; var applicationHost = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; - var compositionEngine = undefined; + var engine = undefined; var instruction = {}; this._configureHost(applicationHost); - compositionEngine = this.container.get(_aureliaTemplating.CompositionEngine); + engine = this.container.get(_aureliaTemplating.TemplatingEngine); instruction.viewModel = root; instruction.container = instruction.childContainer = this.container; instruction.viewSlot = this.hostSlot; instruction.host = this.host; - return compositionEngine.compose(instruction).then(function (r) { + return engine.compose(instruction).then(function (r) { _this7.root = r; instruction.viewSlot.attached(); _this7._onAureliaComposed(); diff --git a/dist/es6/aurelia-framework.d.ts b/dist/es6/aurelia-framework.d.ts index 0959411f..8052ac98 100644 --- a/dist/es6/aurelia-framework.d.ts +++ b/dist/es6/aurelia-framework.d.ts @@ -1,7 +1,7 @@ declare module 'aurelia-framework' { import 'core-js'; import * as TheLogManager from 'aurelia-logging'; - import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, CompositionEngine, Animator, templatingEngine } from 'aurelia-templating'; + import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, TemplatingEngine } from 'aurelia-templating'; import { join } from 'aurelia-path'; import { Container } from 'aurelia-dependency-injection'; import { Loader } from 'aurelia-loader'; diff --git a/dist/es6/aurelia-framework.js b/dist/es6/aurelia-framework.js index 9b0dcdde..5b6fe66a 100644 --- a/dist/es6/aurelia-framework.js +++ b/dist/es6/aurelia-framework.js @@ -1,6 +1,6 @@ import 'core-js'; import * as TheLogManager from 'aurelia-logging'; -import {ViewEngine,BindingLanguage,ViewSlot,ViewResources,CompositionEngine,Animator,templatingEngine} from 'aurelia-templating'; +import {ViewEngine,BindingLanguage,ViewSlot,ViewResources,TemplatingEngine} from 'aurelia-templating'; import {join} from 'aurelia-path'; import {Container} from 'aurelia-dependency-injection'; import {Loader} from 'aurelia-loader'; @@ -393,12 +393,6 @@ export class Aurelia { throw new Error(message); } - if (!this.container.hasResolver(Animator)) { - Animator.configureDefault(this.container); - } - - templatingEngine.initialize(this.container); - this.logger.info('Aurelia Started'); let evt = DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true }); DOM.dispatchEvent(evt); @@ -416,8 +410,8 @@ export class Aurelia { this._configureHost(applicationHost); return new Promise(resolve => { - let viewEngine = this.container.get(ViewEngine); - this.root = viewEngine.enhance(this.container, this.host, this.resources, bindingContext); + let engine = this.container.get(TemplatingEngine); + this.root = engine.enhance({container: this.container, element: this.host, resources: this.resources, bindingContext: bindingContext}); this.root.attached(); this._onAureliaComposed(); return this; @@ -431,18 +425,18 @@ export class Aurelia { * @return Returns a Promise of the current Aurelia instance. */ setRoot(root: string = 'app', applicationHost: string | Element = null): Promise { - let compositionEngine; + let engine; let instruction = {}; this._configureHost(applicationHost); - compositionEngine = this.container.get(CompositionEngine); + engine = this.container.get(TemplatingEngine); instruction.viewModel = root; instruction.container = instruction.childContainer = this.container; instruction.viewSlot = this.hostSlot; instruction.host = this.host; - return compositionEngine.compose(instruction).then(r => { + return engine.compose(instruction).then(r => { this.root = r; instruction.viewSlot.attached(); this._onAureliaComposed(); diff --git a/dist/system/aurelia-framework.d.ts b/dist/system/aurelia-framework.d.ts index 0959411f..8052ac98 100644 --- a/dist/system/aurelia-framework.d.ts +++ b/dist/system/aurelia-framework.d.ts @@ -1,7 +1,7 @@ declare module 'aurelia-framework' { import 'core-js'; import * as TheLogManager from 'aurelia-logging'; - import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, CompositionEngine, Animator, templatingEngine } from 'aurelia-templating'; + import { ViewEngine, BindingLanguage, ViewSlot, ViewResources, TemplatingEngine } from 'aurelia-templating'; import { join } from 'aurelia-path'; import { Container } from 'aurelia-dependency-injection'; import { Loader } from 'aurelia-loader'; diff --git a/dist/system/aurelia-framework.js b/dist/system/aurelia-framework.js index 140380de..f1451c03 100644 --- a/dist/system/aurelia-framework.js +++ b/dist/system/aurelia-framework.js @@ -1,7 +1,7 @@ System.register(['core-js', 'aurelia-logging', 'aurelia-templating', 'aurelia-path', 'aurelia-dependency-injection', 'aurelia-loader', 'aurelia-pal', 'aurelia-binding', 'aurelia-metadata', 'aurelia-task-queue'], function (_export) { 'use strict'; - var TheLogManager, ViewEngine, BindingLanguage, ViewSlot, ViewResources, CompositionEngine, Animator, templatingEngine, join, Container, Loader, DOM, PLATFORM, logger, FrameworkConfiguration, Aurelia, LogManager; + var TheLogManager, ViewEngine, BindingLanguage, ViewSlot, ViewResources, TemplatingEngine, join, Container, Loader, DOM, PLATFORM, logger, FrameworkConfiguration, Aurelia, LogManager; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } @@ -72,9 +72,7 @@ System.register(['core-js', 'aurelia-logging', 'aurelia-templating', 'aurelia-pa BindingLanguage = _aureliaTemplating.BindingLanguage; ViewSlot = _aureliaTemplating.ViewSlot; ViewResources = _aureliaTemplating.ViewResources; - CompositionEngine = _aureliaTemplating.CompositionEngine; - Animator = _aureliaTemplating.Animator; - templatingEngine = _aureliaTemplating.templatingEngine; + TemplatingEngine = _aureliaTemplating.TemplatingEngine; for (var _key4 in _aureliaTemplating) { if (_key4 !== 'default') _export(_key4, _aureliaTemplating[_key4]); @@ -336,12 +334,6 @@ System.register(['core-js', 'aurelia-logging', 'aurelia-templating', 'aurelia-pa throw new Error(message); } - if (!_this5.container.hasResolver(Animator)) { - Animator.configureDefault(_this5.container); - } - - templatingEngine.initialize(_this5.container); - _this5.logger.info('Aurelia Started'); var evt = DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true }); DOM.dispatchEvent(evt); @@ -358,8 +350,8 @@ System.register(['core-js', 'aurelia-logging', 'aurelia-templating', 'aurelia-pa this._configureHost(applicationHost); return new Promise(function (resolve) { - var viewEngine = _this6.container.get(ViewEngine); - _this6.root = viewEngine.enhance(_this6.container, _this6.host, _this6.resources, bindingContext); + var engine = _this6.container.get(TemplatingEngine); + _this6.root = engine.enhance({ container: _this6.container, element: _this6.host, resources: _this6.resources, bindingContext: bindingContext }); _this6.root.attached(); _this6._onAureliaComposed(); return _this6; @@ -372,18 +364,18 @@ System.register(['core-js', 'aurelia-logging', 'aurelia-templating', 'aurelia-pa var root = arguments.length <= 0 || arguments[0] === undefined ? 'app' : arguments[0]; var applicationHost = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; - var compositionEngine = undefined; + var engine = undefined; var instruction = {}; this._configureHost(applicationHost); - compositionEngine = this.container.get(CompositionEngine); + engine = this.container.get(TemplatingEngine); instruction.viewModel = root; instruction.container = instruction.childContainer = this.container; instruction.viewSlot = this.hostSlot; instruction.host = this.host; - return compositionEngine.compose(instruction).then(function (r) { + return engine.compose(instruction).then(function (r) { _this7.root = r; instruction.viewSlot.attached(); _this7._onAureliaComposed(); diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 0abd27d3..fd18ce33 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.18.0 (2015-11-10) + + +#### Bug Fixes + +* **all:** update to work with latest TemplatingEngine ([edf2b5f8](http://github.com/aurelia/framework/commit/edf2b5f8e5a47984219e2be26d7b762b9d7eab7c)) + + ## 0.17.0 (2015-10-13) diff --git a/doc/api.json b/doc/api.json index 8b3a4d2a..0e3ad219 100644 --- a/doc/api.json +++ b/doc/api.json @@ -53,7 +53,7 @@ "type": { "type": "reference", "name": "Loader", - "id": 1506, + "id": 1714, "moduleName": "\"aurelia-loader\"" } }, @@ -71,7 +71,7 @@ "type": { "type": "reference", "name": "Container", - "id": 1386, + "id": 1593, "moduleName": "\"aurelia-dependency-injection\"" } }, @@ -89,7 +89,7 @@ "type": { "type": "reference", "name": "ViewResources", - "id": 2074, + "id": 2261, "moduleName": "\"aurelia-templating\"" } } @@ -117,7 +117,7 @@ "type": { "type": "reference", "name": "Container", - "id": 1386, + "id": 1593, "moduleName": "\"aurelia-dependency-injection\"" } }, @@ -135,7 +135,7 @@ "type": { "type": "reference", "name": "Loader", - "id": 1506, + "id": 1714, "moduleName": "\"aurelia-loader\"" } }, @@ -153,7 +153,7 @@ "type": { "type": "reference", "name": "ViewResources", - "id": 2074, + "id": 2261, "moduleName": "\"aurelia-templating\"" } }, @@ -482,7 +482,7 @@ "type": { "type": "reference", "name": "Container", - "id": 1386, + "id": 1593, "moduleName": "\"aurelia-dependency-injection\"" } }, diff --git a/package.json b/package.json index 79932d8d..df20d71d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-framework", - "version": "0.17.0", + "version": "0.18.0", "description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.", "keywords": [ "aurelia", From dbeb8a4a6b43726f22a2afc5a4f4818e3ab65b2a Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Mon, 16 Nov 2015 10:27:36 -0500 Subject: [PATCH 004/539] chore(all): prepare release 1.0.0-beta.1 --- bower.json | 20 +++++----- build/tasks/doc.js | 4 +- build/tasks/test.js | 26 +++++-------- config.js | 94 ++++++++++++++++++++++----------------------- doc/CHANGELOG.md | 4 +- doc/api.json | 14 +++---- package.json | 39 ++++++++++++------- 7 files changed, 105 insertions(+), 96 deletions(-) diff --git a/bower.json b/bower.json index 85790709..f35e76df 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-framework", - "version": "0.18.0", + "version": "1.0.0-beta.1", "description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.", "keywords": [ "aurelia", @@ -17,15 +17,15 @@ "url": "http://github.com/aurelia/framework" }, "dependencies": { - "aurelia-binding": "^0.11.0", - "aurelia-dependency-injection": "^0.12.0", - "aurelia-loader": "^0.11.0", - "aurelia-logging": "^0.9.0", - "aurelia-metadata": "^0.10.0", - "aurelia-pal": "^0.3.0", - "aurelia-path": "^0.11.0", - "aurelia-task-queue": "^0.9.0", - "aurelia-templating": "^0.17.0", + "aurelia-binding": "^1.0.0-beta.1.0.1", + "aurelia-dependency-injection": "^1.0.0-beta.1", + "aurelia-loader": "^1.0.0-beta.1", + "aurelia-logging": "^1.0.0-beta.1", + "aurelia-metadata": "^1.0.0-beta.1", + "aurelia-pal": "^1.0.0-beta.1", + "aurelia-path": "^1.0.0-beta.1", + "aurelia-task-queue": "^1.0.0-beta.1", + "aurelia-templating": "^1.0.0-beta.1", "core-js": "zloirock/core-js" } } diff --git a/build/tasks/doc.js b/build/tasks/doc.js index a2781668..7fdf3422 100644 --- a/build/tasks/doc.js +++ b/build/tasks/doc.js @@ -5,7 +5,7 @@ var typedocExtractor = require("gulp-typedoc-extractor"); var runSequence = require('run-sequence'); gulp.task('doc-generate', function(){ - return gulp.src([paths.output + '*.d.ts', paths.doc + '/core-js.d.ts', './jspm_packages/github/aurelia/*/*.d.ts']) + return gulp.src([paths.output + '*.d.ts', paths.doc + '/core-js.d.ts', './jspm_packages/npm/*/*.d.ts']) .pipe(typedoc({             target: "es6",             includeDeclarations: true, @@ -30,4 +30,4 @@ gulp.task('doc', function(callback){ 'doc-extract', callback ); -}); \ No newline at end of file +}); diff --git a/build/tasks/test.js b/build/tasks/test.js index 71884759..c7af441c 100644 --- a/build/tasks/test.js +++ b/build/tasks/test.js @@ -1,34 +1,30 @@ var gulp = require('gulp'); -var karma = require('karma').server; +var Karma = require('karma').Server; /** * Run test once and exit */ gulp.task('test', function (done) { - karma.start({ - configFile: __dirname + '/../../karma.conf.js', - singleRun: true - }, function(e) { - done(); - }); + new Karma({ + configFile: __dirname + '/../../karma.conf.js', + singleRun: true + }, done).start(); }); /** * Watch for file changes and re-run tests on each change */ gulp.task('tdd', function (done) { - karma.start({ - configFile: __dirname + '/../../karma.conf.js' - }, function(e) { - done(); - }); + new Karma({ + configFile: __dirname + '/../../karma.conf.js' + }, done).start(); }); /** * Run test once with code coverage and exit */ gulp.task('cover', function (done) { - karma.start({ + new Karma({ configFile: __dirname + '/../../karma.conf.js', singleRun: true, reporters: ['coverage'], @@ -40,7 +36,5 @@ gulp.task('cover', function (done) { type: 'html', dir: 'build/reports/coverage' } - }, function (e) { - done(); - }); + }, done).start(); }); diff --git a/config.js b/config.js index 8ef35648..a0030804 100644 --- a/config.js +++ b/config.js @@ -14,56 +14,19 @@ System.config({ }, map: { - "aurelia-binding": "github:aurelia/binding@0.11.0", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.12.0", - "aurelia-loader": "github:aurelia/loader@0.11.0", - "aurelia-logging": "github:aurelia/logging@0.9.0", - "aurelia-metadata": "github:aurelia/metadata@0.10.0", - "aurelia-pal": "github:aurelia/pal@0.3.0", - "aurelia-pal-browser": "github:aurelia/pal-browser@0.3.0", - "aurelia-path": "github:aurelia/path@0.11.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.9.0", - "aurelia-templating": "github:aurelia/templating@0.17.0", + "aurelia-binding": "npm:aurelia-binding@1.0.0-beta.1.0.1", + "aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.1", + "aurelia-loader": "npm:aurelia-loader@1.0.0-beta.1", + "aurelia-logging": "npm:aurelia-logging@1.0.0-beta.1", + "aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1", + "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1", + "aurelia-pal-browser": "npm:aurelia-pal-browser@1.0.0-beta.1", + "aurelia-path": "npm:aurelia-path@1.0.0-beta.1", + "aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.1", + "aurelia-templating": "npm:aurelia-templating@1.0.0-beta.1", "babel": "npm:babel-core@5.2.2", "babel-runtime": "npm:babel-runtime@5.2.2", "core-js": "npm:core-js@1.2.6", - "github:aurelia/binding@0.11.0": { - "aurelia-metadata": "github:aurelia/metadata@0.10.0", - "aurelia-pal": "github:aurelia/pal@0.3.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.9.0", - "core-js": "npm:core-js@1.2.6" - }, - "github:aurelia/dependency-injection@0.12.0": { - "aurelia-logging": "github:aurelia/logging@0.9.0", - "aurelia-metadata": "github:aurelia/metadata@0.10.0", - "aurelia-pal": "github:aurelia/pal@0.3.0", - "core-js": "npm:core-js@1.2.6" - }, - "github:aurelia/loader@0.11.0": { - "aurelia-metadata": "github:aurelia/metadata@0.10.0", - "aurelia-path": "github:aurelia/path@0.11.0" - }, - "github:aurelia/metadata@0.10.0": { - "aurelia-pal": "github:aurelia/pal@0.3.0", - "core-js": "npm:core-js@1.2.6" - }, - "github:aurelia/pal-browser@0.3.0": { - "aurelia-pal": "github:aurelia/pal@0.3.0" - }, - "github:aurelia/task-queue@0.9.0": { - "aurelia-pal": "github:aurelia/pal@0.3.0" - }, - "github:aurelia/templating@0.17.0": { - "aurelia-binding": "github:aurelia/binding@0.11.0", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.12.0", - "aurelia-loader": "github:aurelia/loader@0.11.0", - "aurelia-logging": "github:aurelia/logging@0.9.0", - "aurelia-metadata": "github:aurelia/metadata@0.10.0", - "aurelia-pal": "github:aurelia/pal@0.3.0", - "aurelia-path": "github:aurelia/path@0.11.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.9.0", - "core-js": "npm:core-js@1.2.6" - }, "github:jspm/nodelibs-assert@0.1.0": { "assert": "npm:assert@1.3.0" }, @@ -79,6 +42,43 @@ System.config({ "npm:assert@1.3.0": { "util": "npm:util@0.10.3" }, + "npm:aurelia-binding@1.0.0-beta.1.0.1": { + "aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1", + "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1", + "aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.1", + "core-js": "npm:core-js@1.2.6" + }, + "npm:aurelia-dependency-injection@1.0.0-beta.1": { + "aurelia-logging": "npm:aurelia-logging@1.0.0-beta.1", + "aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1", + "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1", + "core-js": "npm:core-js@1.2.6" + }, + "npm:aurelia-loader@1.0.0-beta.1": { + "aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1", + "aurelia-path": "npm:aurelia-path@1.0.0-beta.1" + }, + "npm:aurelia-metadata@1.0.0-beta.1": { + "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1", + "core-js": "npm:core-js@1.2.6" + }, + "npm:aurelia-pal-browser@1.0.0-beta.1": { + "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1" + }, + "npm:aurelia-task-queue@1.0.0-beta.1": { + "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1" + }, + "npm:aurelia-templating@1.0.0-beta.1": { + "aurelia-binding": "npm:aurelia-binding@1.0.0-beta.1.0.1", + "aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.1", + "aurelia-loader": "npm:aurelia-loader@1.0.0-beta.1", + "aurelia-logging": "npm:aurelia-logging@1.0.0-beta.1", + "aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1", + "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1", + "aurelia-path": "npm:aurelia-path@1.0.0-beta.1", + "aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.1", + "core-js": "npm:core-js@1.2.6" + }, "npm:core-js@1.2.6": { "fs": "github:jspm/nodelibs-fs@0.1.2", "path": "github:jspm/nodelibs-path@0.1.0", diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index fd18ce33..3de85b10 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,6 @@ +### 1.0.0-beta.1 (2015-11-16) + + ## 0.18.0 (2015-11-10) @@ -458,4 +461,3 @@ function, this will affect you as that is no longer present. #### Bug Fixes * **package:** update dependencies to their latest versions ([fe83ef37](http://github.com/aurelia/framework/commit/fe83ef37fdcdf878dd79564ed9b97ee56de8d621)) - diff --git a/doc/api.json b/doc/api.json index 0e3ad219..d5a9acd5 100644 --- a/doc/api.json +++ b/doc/api.json @@ -53,7 +53,7 @@ "type": { "type": "reference", "name": "Loader", - "id": 1714, + "id": 605, "moduleName": "\"aurelia-loader\"" } }, @@ -71,7 +71,7 @@ "type": { "type": "reference", "name": "Container", - "id": 1593, + "id": 484, "moduleName": "\"aurelia-dependency-injection\"" } }, @@ -89,7 +89,7 @@ "type": { "type": "reference", "name": "ViewResources", - "id": 2261, + "id": 1158, "moduleName": "\"aurelia-templating\"" } } @@ -117,7 +117,7 @@ "type": { "type": "reference", "name": "Container", - "id": 1593, + "id": 484, "moduleName": "\"aurelia-dependency-injection\"" } }, @@ -135,7 +135,7 @@ "type": { "type": "reference", "name": "Loader", - "id": 1714, + "id": 605, "moduleName": "\"aurelia-loader\"" } }, @@ -153,7 +153,7 @@ "type": { "type": "reference", "name": "ViewResources", - "id": 2261, + "id": 1158, "moduleName": "\"aurelia-templating\"" } }, @@ -482,7 +482,7 @@ "type": { "type": "reference", "name": "Container", - "id": 1593, + "id": 484, "moduleName": "\"aurelia-dependency-injection\"" } }, diff --git a/package.json b/package.json index df20d71d..47c2aff6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-framework", - "version": "0.18.0", + "version": "1.0.0-beta.1", "description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.", "keywords": [ "aurelia", @@ -18,6 +18,7 @@ "type": "git", "url": "http://github.com/aurelia/framework" }, + "jspmNodeConversion": false, "jspm": { "main": "aurelia-framework", "format": "amd", @@ -25,27 +26,39 @@ "lib": "dist/amd" }, "dependencies": { - "aurelia-binding": "github:aurelia/binding@^0.11.0", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.12.0", - "aurelia-loader": "github:aurelia/loader@^0.11.0", - "aurelia-logging": "github:aurelia/logging@^0.9.0", - "aurelia-metadata": "github:aurelia/metadata@^0.10.0", - "aurelia-pal": "github:aurelia/pal@^0.3.0", - "aurelia-path": "github:aurelia/path@^0.11.0", - "aurelia-task-queue": "github:aurelia/task-queue@^0.9.0", - "aurelia-templating": "github:aurelia/templating@^0.17.0", + "aurelia-binding": "npm:aurelia-binding@^1.0.0-beta.1.0.1", + "aurelia-dependency-injection": "npm:aurelia-dependency-injection@^1.0.0-beta.1", + "aurelia-loader": "npm:aurelia-loader@^1.0.0-beta.1", + "aurelia-logging": "npm:aurelia-logging@^1.0.0-beta.1", + "aurelia-metadata": "npm:aurelia-metadata@^1.0.0-beta.1", + "aurelia-pal": "npm:aurelia-pal@^1.0.0-beta.1", + "aurelia-path": "npm:aurelia-path@^1.0.0-beta.1", + "aurelia-task-queue": "npm:aurelia-task-queue@^1.0.0-beta.1", + "aurelia-templating": "npm:aurelia-templating@^1.0.0-beta.1", "core-js": "npm:core-js@^1.2.6" }, "devDependencies": { - "aurelia-pal-browser": "github:aurelia/pal-browser@^0.3.0", + "aurelia-pal-browser": "npm:aurelia-pal-browser@^1.0.0-beta.1", "babel": "npm:babel-core@^5.1.13", "babel-runtime": "npm:babel-runtime@^5.1.13", "core-js": "npm:core-js@^1.2.6" } }, + "dependencies": { + "aurelia-binding": "^1.0.0-beta.1.0.1", + "aurelia-dependency-injection": "^1.0.0-beta.1", + "aurelia-loader": "^1.0.0-beta.1", + "aurelia-logging": "^1.0.0-beta.1", + "aurelia-metadata": "^1.0.0-beta.1", + "aurelia-pal": "^1.0.0-beta.1", + "aurelia-path": "^1.0.0-beta.1", + "aurelia-task-queue": "^1.0.0-beta.1", + "aurelia-templating": "^1.0.0-beta.1", + "core-js": "^1.2.6" + }, "devDependencies": { "aurelia-tools": "^0.1.12", - "babel-dts-generator": "^0.2.16", + "babel-dts-generator": "^0.2.17", "babel-eslint": "^4.1.1", "conventional-changelog": "0.0.11", "del": "^1.1.0", @@ -59,7 +72,7 @@ "gulp-typedoc": "^1.2.1", "gulp-typedoc-extractor": "0.0.8", "jasmine-core": "^2.1.3", - "karma": "^0.12.28", + "karma": "^0.13.15", "karma-babel-preprocessor": "^5.2.2", "karma-chrome-launcher": "^0.1.7", "karma-coverage": "^0.3.1", From 5551c229351aa233c4a3286dad644ac40322f7a1 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Wed, 18 Nov 2015 13:38:46 -0500 Subject: [PATCH 005/539] doc(all): some new docs content --- doc/article/en-US/a-production-setup.html | 112 ++ doc/article/en-US/business-advantages.html | 46 + doc/article/en-US/cheat-sheet.html | 1885 ++++++++++++++++++++ doc/article/en-US/creating-components.html | 141 ++ doc/article/en-US/getting-help.html | 18 + doc/article/en-US/getting-started.html | 731 ++++++++ doc/article/en-US/technical-benefits.html | 99 + doc/article/en-US/what-is-aurelia.html | 40 + 8 files changed, 3072 insertions(+) create mode 100644 doc/article/en-US/a-production-setup.html create mode 100644 doc/article/en-US/business-advantages.html create mode 100644 doc/article/en-US/cheat-sheet.html create mode 100644 doc/article/en-US/creating-components.html create mode 100644 doc/article/en-US/getting-help.html create mode 100644 doc/article/en-US/getting-started.html create mode 100644 doc/article/en-US/technical-benefits.html create mode 100644 doc/article/en-US/what-is-aurelia.html diff --git a/doc/article/en-US/a-production-setup.html b/doc/article/en-US/a-production-setup.html new file mode 100644 index 00000000..167fc3ee --- /dev/null +++ b/doc/article/en-US/a-production-setup.html @@ -0,0 +1,112 @@ + + + A Production Setup + + + + + + + + ## Configuring Your Environment + + Let's start by getting you set up with a great set of tools that you can use to build modern JavaScript applications. All our tooling is built on [Node.js](http://nodejs.org/). If you have that installed already, great! If not, you should go to [the official web site](http://nodejs.org/), download and install it. Everything else we need will be installed via Node's package manager ([npm](https://docs.npmjs.com/getting-started/what-is-npm)). If you already have npm installed, make sure you've got the [latest version](https://github.com/npm/npm/wiki/Troubleshooting#try-the-latest-stable-version-of-node) to avoid any issues with the other tools. + + > **Note:** For command-line operations, we recommend Windows users to use Git Bash or Git Shell. + + First, let's begin by installing [Gulp](http://gulpjs.com/) which we'll be using for build automation. If you don't have it already, you can use npm to set it up like this (in some environments you may need to use `sudo`): + + ```shell + npm install -g gulp + ``` + + Next, we need to install [jspm](http://jspm.io/). This will serve as our client-side package manager. You can do that like this: + + ```shell + npm install -g jspm + ``` + + > **Note:** Don't want to use jspm? No problem. All Aurelia packages are available via [Bower](http://bower.io/) as well. + + + + ## Setting up the Project Structure and Build + + With the tooling installed, we can now turn our attention to setting up a basic structure for your app. Begin by [downloading the navigation skeleton](https://github.com/aurelia/skeleton-navigation/releases). Unzip it and rename the folder to appropriately represent the app you want to build. + + > **Note:** Alternatively, you can use [Yeoman](http://yeoman.io) to "generate" the skeleton project in the target folder, as follows: + > + > ``` + > npm install -g yo generator-aurelia + > yo aurelia + > ``` + > + > This also runs the `npm` and `jspm` commands listed below. + + Inside the folder you will now find everything you need, including a basic build, package configuration, styles and more. With all this in place, let's run some commands. + + 1. Open a console and change directory into your app's directory. + 2. Execute the following command to install the Gulp plugins listed in the _devDependencies_ section of the package manifest: + ```shell + npm install + ``` + 3. Next, execute the following command to install the Aurelia libraries, bootstrap and font-awesome, listed in the _jspm.dependencies_ section of the package manifest: + ```shell + jspm install -y + ``` + Everything we've done so far is standard Node.js build and package management procedures. It doesn't have anything specific to do with Aurelia itself. We're just walking you through setting up a modern JavaScript project and build configuration from scratch. You may be familiar with this already, but if not then welcome to this new and exciting world! + + > **Note:** Bootstrap and Font-Awesome are **not** dependencies of Aurelia. We only leverage them as part of the starter kit in order to help you quickly achieve a decent look out-of-the-box. You can easily replace them with whatever your favorite CSS framework and/or icon library is. + + + + + ## Running The App + + If you've followed along this far, you now have all the libraries, build configuration and tools you need to create amazing JavaScript apps with Aurelia. The next thing to do is run the sample app. To see this in action, on your console, use the following command to build and launch the server: + ```shell + gulp watch + ``` + You can now browse to [http://localhost:9000/](http://localhost:9000/) to see the app. + + > **Note:** The Skeleton App uses [BrowserSync](http://www.browsersync.io/) for automated page refreshes on code/markup changes concurrently accross multiple browsers. If you prefer to disable the mirroring feature set the [ghostMode option](http://www.browsersync.io/docs/options/#option-ghostMode) to false in your build config. + + + + ## Running The Unit Tests + + To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps: + + 1. Ensure that the [Karma](http://karma-runner.github.io/) CLI is installed. If you need to install it, use the following command: + ```shell + npm install -g karma-cli + ``` + 2. You can now run the tests with this command: + ```shell + karma start + ``` + + + + ## Running The E2E Tests + + Integration tests are performed with [Protractor](http://angular.github.io/protractor/#/). + + 1. Place your E2E-Tests into the folder ```test/e2e/src```. + 2. Install the necessary webdriver: + ```shell + gulp webdriver_update + ``` + 3. Configure the path to the webdriver by opening the file ```protractor.conf.js``` and adjusting the ```seleniumServerJar``` property. Typically it's only needed to adjust the version number. + 4. Make sure your app runs and is accessible: + ```shell + gulp watch + ``` + 5. In another console run the E2E-Tests: + ```shell + gulp e2e + ``` + + + diff --git a/doc/article/en-US/business-advantages.html b/doc/article/en-US/business-advantages.html new file mode 100644 index 00000000..02103f35 --- /dev/null +++ b/doc/article/en-US/business-advantages.html @@ -0,0 +1,46 @@ + + + Business Advantages + + + + + + + + ## Commerically Backed + + * One of the only two main-stream, open-source SPA frameworks with official commercial backing (Ember is the other). + * The only SPA framework with commercial support options available. + * Custom contracts available for enterprises. + * Internally “dogfooded” by Durandal Inc. in its own business-critical products. + + Many technologists make incorrect assumptions in this space. You may hear about "Google's Polymer" (or Angular) or "Facebook's React". However, these libraries aren't official products of their repsective companies. React team members have stated publicly that Facebook is not committed to the React library. Google developers have stated publicly that Polymer is not a Google product and developers are not considered customers. Angular and Polymer are two out of six UI libraries built by Google employees, all competative with one another, and none officially recognized by the company. There is much marketing and brand recognition around these libraries but no guarantee and little hope of long-term stability. We encourage you to try to see past the marketing, brands and hype and into the core capabilities and benefits of the technology itself. If you do, we think you'll realize that Aurelia is the best option available. + + + + ## Commercial Products and Services + + * Official on-site or virtual training. + * Consulting, advisory and code-review services. + * Aurelia Interface (In Development) - Cross-platform, mobile UI components. + * Aurelia Data Controls (In Development) - Data-oriented and LOB components. + * Much more coming... + + + + ## Strategic Partnerships + + * Partnerships with both large and boutique consulting organizations in order to provide scale-out of developer resources as needed by businesses adopting Aurelia. + * Official training partners around the world to deliver training anywhere and anytime. + + + + ## Broad Customer Reach + + * Applications developed in virtually every space: healthcare, insurance, finance, entertainment, technology, developer tools, LOB, gaming, etc. + * Used internally at serveral, well-known enterprises. + * Adoption among large, international organizations. + + + diff --git a/doc/article/en-US/cheat-sheet.html b/doc/article/en-US/cheat-sheet.html new file mode 100644 index 00000000..23d53c9d --- /dev/null +++ b/doc/article/en-US/cheat-sheet.html @@ -0,0 +1,1885 @@ + + + Cheat Sheet + + + + + + + + ## Configuration and Startup + + + + + + + + + + + + + export function configure(aurelia) { + aurelia.use + .standardConfiguration() + .developmentLogging(); + + aurelia.start().then(() => aurelia.setRoot()); + } + + + import {Aurelia} from 'aurelia-framework'; + + export function configure(aurelia: Aurelia): void { + aurelia.use + .standardConfiguration() + .developmentLogging(); + + aurelia.start().then(() => aurelia.setRoot()); + } + + + + + + import {LogManager} from 'aurelia-framework'; + import {ConsoleAppender} from 'aurelia-logging-console'; + + LogManager.addAppender(new ConsoleAppender()); + LogManager.setLevel(LogManager.logLevel.debug); + + export function configure(aurelia) { + aurelia.use + .defaultBindingLanguage() + .defaultResources() + .history() + .router() + .eventAggregator(); + + aurelia.start().then(() => aurelia.setRoot('app', document.body)); + } + + + import {LogManager, Aurelia} from 'aurelia-framework'; + import {ConsoleAppender} from 'aurelia-logging-console'; + + LogManager.addAppender(new ConsoleAppender()); + LogManager.setLevel(LogManager.logLevel.debug); + + export function configure(aurelia: Aurelia): void { + aurelia.use + .defaultBindingLanguage() + .defaultResources() + .history() + .router() + .eventAggregator(); + + aurelia.start().then(() => aurelia.setRoot('app', document.body)); + } + + + + + + export function configure(aurelia) { + aurelia.use + .standardConfiguration() + .developmentLogging() + .feature('feature-name', featureConfiguration); + + aurelia.start().then(() => aurelia.setRoot()); + } + + + import {Aurelia} from 'aurelia-framework'; + + export function configure(aurelia: Aurelia): void { + aurelia.use + .standardConfiguration() + .developmentLogging() + .feature('feature-name', featureConfiguration); + + aurelia.start().then(() => aurelia.setRoot()); + } + + + + + + export function configure(aurelia) { + aurelia.use + .standardConfiguration() + .developmentLogging() + .plugin('plugin-name', pluginConfiguration); + + aurelia.start().then(() => aurelia.setRoot()); + } + + + import {Aurelia} from 'aurelia-framework'; + + export function configure(aurelia: Aurelia): void { + aurelia.use + .standardConfiguration() + .developmentLogging() + .plugin('plugin-name', pluginConfiguration); + + aurelia.start().then(() => aurelia.setRoot()); + } + + + + + ## Creating Components + + UI components consist of two parts: a view-model and a view. Simply create each part in its own file. Use the same file name but different file extensions for the two parts. For example: _hello.js_ and _hello.html_. + + + + + import {useView, decorators} from 'aurelia-framework'; + + export let Hello = decorators(useView('./hello.html')).on(class { + ... + }); + + + import {useView} from 'aurelia-framework'; + + @useView('./hello.html') + export class Hello { + ... + } + + + import {useView} from 'aurelia-framework'; + + @useView('./hello.html') + export class Hello { + ... + } + + + + + #### The Component Lifecycle + + Components have a well-defined lifecycle: + + 1. `constructor()` - The view-model's constructor is called first. + 2. `created(owningView: View, myView: View)` - If the view-model implements the `created` callback it is invoked next. At this point in time, the view has also been created and both the view-model and the view are connected to their controller. The created callback will recieve the instance of the "owningView". This is the view that the compoment is declared inside of. If the component itself has a view, this will be passed second. + 3. `bind(bindingContext: Object, overrideContext: Object)` - Databinding is then activated on the view and view-model. If the view-model has a `bind` callback, it will be invoked at this time. The "binding context" to which the component is being boudn will be passed first. An "override context" will be passed second. The override context contains information used to travers the parent hierarchy and can also be used to add any contextual properties that the component wants to add. + 4. `attached()` - Next, the component is attached to the DOM (in document). If the view-model has an `attached` callback, it will be invoked at this time. + 5. `detached()` - At some point in the future, the component may be removed from the DOM. If/When this happens, and if the view-model has a `detached` callback, this is when it will be invoked. + 6. `unbind()` - After a component is detached, it's usually unbound. If your view-model has the `unbind` callback, it will be invoked during this process. + + + + ## Dependency Injection + + + + + import {inject} from 'aurelia-framework'; + import {Dep1} from 'dep1'; + import {Dep2} from 'dep2'; + + @inject(Dep1, Dep2) + export class CustomerDetail { + constructor(dep1, dep2) { + this.dep1 = dep1; + this.dep2 = dep2; + } + } + + + import {Dep1} from 'dep1'; + import {Dep2} from 'dep2'; + + export class CustomerDetail { + static inject() { return [Dep1, Dep2]; } + + constructor(dep1, dep2) { + this.dep1 = dep1; + this.dep2 = dep2; + } + } + + + import {autoinject} from 'aurelia-framework'; + import {Dep1} from 'dep1'; + import {Dep2} from 'dep2'; + + @autoinject + export class CustomerDetail { + constructor(private dep1: Dep1, private dep2: Dep2){ + this.dep1 = dep1; + this.dep2 = dep2; + } + } + + + + + + import {Lazy, inject} from 'aurelia-framework'; + import {HttpClient} from 'aurelia-fetch-client'; + + @inject(Lazy.of(HttpClient)) + export class CustomerDetail { + constructor(getHTTP){ + this.getHTTP = getHTTP; + } + } + + + import {Lazy} from 'aurelia-framework'; + import {HttpClient} from 'aurelia-fetch-client'; + + export class CustomerDetail { + static inject() { return [Lazy.of(HttpClient)]; } + + constructor(getHTTP){ + this.getHTTP = getHTTP; + } + } + + + import {Lazy, inject} from 'aurelia-framework'; + import {HttpClient} from 'aurelia-fetch-client'; + + @inject(Lazy.of(HttpClient)) + export class CustomerDetail { + constructor(private getHTTP: () => HttpClient){ + this.getHTTP = getHTTP; + } + } + + + + + #### Available Resolvers + + * `Lazy` - Injects a function for lazily evaluating the dependency. + * ex. `Lazy.of(HttpClient)` + * `All` - Injects an array of all services registered with the provided key. + * ex. `All.of(Plugin)` + * `Optional` - Injects an instance of a class only if it already exists in the container; null otherwise. + * ex. `Optional.of(LoggedInUser)` + + + + + import {transient, inject} from 'aurelia-framework'; + import {HttpClient} from 'aurelia-fetch-client'; + + @transient() + @inject(HttpClient) + export class CustomerDetail { + constructor(http) { + this.http = http; + } + } + + + import {transient, inject} from 'aurelia-framework'; + import {HttpClient} from 'aurelia-fetch-client'; + + export let CustomDetail = decorators( + transient() + inject(HttpClient) + ).on(class { + constructor(http) { + this.http = http; + } + }); + + + import {transient, autoinject} from 'aurelia-framework'; + import {HttpClient} from 'aurelia-fetch-client'; + + @transient() + @autoinject + export class CustomerDetail { + constructor(private http: HttpClient) { + this.http = http; + } + } + + + + + ## Templating Basics + + + + + + + + + + + + + + + + + + + + + + + + + + + + +