diff --git a/bower.json b/bower.json index f91aabf8..5cc531b9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-framework", - "version": "1.0.8", + "version": "1.1.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.js b/dist/amd/aurelia-framework.js index 5d5ea32e..53cc1ea9 100644 --- a/dist/amd/aurelia-framework.js +++ b/dist/amd/aurelia-framework.js @@ -130,14 +130,12 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m Aurelia.prototype.start = function start() { var _this = this; - if (this.started) { - return Promise.resolve(this); + if (this._started) { + return this._started; } - this.started = true; this.logger.info('Aurelia Starting'); - - return this.use.apply().then(function () { + return this._started = this.use.apply().then(function () { preventActionlessFormSubmit(); if (!_this.container.hasResolver(_aureliaTemplating.BindingLanguage)) { @@ -402,12 +400,13 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m return this; }; - FrameworkConfiguration.prototype.feature = function feature(plugin, config) { - if (getExt(plugin)) { - return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} }); - } + FrameworkConfiguration.prototype.feature = function feature(plugin) { + var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} }); + var hasIndex = /\/index$/i.test(plugin); + var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index'; + var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin; + return this.plugin({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config }); }; FrameworkConfiguration.prototype.globalResources = function globalResources(resources) { diff --git a/dist/aurelia-framework.js b/dist/aurelia-framework.js index cb47ad12..5358e657 100644 --- a/dist/aurelia-framework.js +++ b/dist/aurelia-framework.js @@ -68,14 +68,12 @@ export class Aurelia { * @return Returns a Promise with the started Aurelia instance. */ start(): Promise { - if (this.started) { - return Promise.resolve(this); + if (this._started) { + return this._started; } - this.started = true; this.logger.info('Aurelia Starting'); - - return this.use.apply().then(() => { + return this._started = this.use.apply().then(() => { preventActionlessFormSubmit(); if (!this.container.hasResolver(BindingLanguage)) { @@ -378,12 +376,11 @@ export class FrameworkConfiguration { * @param config The configuration for the specified plugin. * @return Returns the current FrameworkConfiguration instance. */ - feature(plugin: string, config?: any): FrameworkConfiguration { - if (getExt(plugin)) { - return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} }); - } - - return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} }); + feature(plugin: string, config?: any = {}): FrameworkConfiguration { + let hasIndex = /\/index$/i.test(plugin); + let moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index'; + let root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin; + return this.plugin({ moduleId, resourcesRelativeTo: [root, ''], config }); } /** @@ -461,6 +458,14 @@ export class FrameworkConfiguration { return this; } + // Default configuration helpers + // Note: Please do NOT add PLATFORM.moduleName() around those module names. + // Those functions are not guaranteed to be called, they are here to faciliate + // common configurations. If they are not called, we don't want to include a + // static dependency on those modules. + // Including those modules in the bundle or not is a decision that must be + // taken by the bundling tool, at build time. + /** * Plugs in the default binding language from aurelia-templating-binding. * @return Returns the current FrameworkConfiguration instance. diff --git a/dist/commonjs/aurelia-framework.js b/dist/commonjs/aurelia-framework.js index 30e14777..16be22d9 100644 --- a/dist/commonjs/aurelia-framework.js +++ b/dist/commonjs/aurelia-framework.js @@ -140,14 +140,12 @@ var Aurelia = exports.Aurelia = function () { Aurelia.prototype.start = function start() { var _this = this; - if (this.started) { - return Promise.resolve(this); + if (this._started) { + return this._started; } - this.started = true; this.logger.info('Aurelia Starting'); - - return this.use.apply().then(function () { + return this._started = this.use.apply().then(function () { preventActionlessFormSubmit(); if (!_this.container.hasResolver(_aureliaTemplating.BindingLanguage)) { @@ -412,12 +410,13 @@ var FrameworkConfiguration = function () { return this; }; - FrameworkConfiguration.prototype.feature = function feature(plugin, config) { - if (getExt(plugin)) { - return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} }); - } + FrameworkConfiguration.prototype.feature = function feature(plugin) { + var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} }); + var hasIndex = /\/index$/i.test(plugin); + var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index'; + var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin; + return this.plugin({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config }); }; FrameworkConfiguration.prototype.globalResources = function globalResources(resources) { diff --git a/dist/es2015/aurelia-framework.js b/dist/es2015/aurelia-framework.js index f0b41837..19a3f2b2 100644 --- a/dist/es2015/aurelia-framework.js +++ b/dist/es2015/aurelia-framework.js @@ -32,14 +32,12 @@ export let Aurelia = class Aurelia { } start() { - if (this.started) { - return Promise.resolve(this); + if (this._started) { + return this._started; } - this.started = true; this.logger.info('Aurelia Starting'); - - return this.use.apply().then(() => { + return this._started = this.use.apply().then(() => { preventActionlessFormSubmit(); if (!this.container.hasResolver(BindingLanguage)) { @@ -276,12 +274,11 @@ export let FrameworkConfiguration = class FrameworkConfiguration { return this; } - feature(plugin, config) { - if (getExt(plugin)) { - return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} }); - } - - return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} }); + feature(plugin, config = {}) { + let hasIndex = /\/index$/i.test(plugin); + let moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index'; + let root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin; + return this.plugin({ moduleId, resourcesRelativeTo: [root, ''], config }); } globalResources(resources) { diff --git a/dist/native-modules/aurelia-framework.js b/dist/native-modules/aurelia-framework.js index 9e9c34f0..b2d83f18 100644 --- a/dist/native-modules/aurelia-framework.js +++ b/dist/native-modules/aurelia-framework.js @@ -38,14 +38,12 @@ export var Aurelia = function () { Aurelia.prototype.start = function start() { var _this = this; - if (this.started) { - return Promise.resolve(this); + if (this._started) { + return this._started; } - this.started = true; this.logger.info('Aurelia Starting'); - - return this.use.apply().then(function () { + return this._started = this.use.apply().then(function () { preventActionlessFormSubmit(); if (!_this.container.hasResolver(BindingLanguage)) { @@ -310,12 +308,13 @@ var FrameworkConfiguration = function () { return this; }; - FrameworkConfiguration.prototype.feature = function feature(plugin, config) { - if (getExt(plugin)) { - return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} }); - } + FrameworkConfiguration.prototype.feature = function feature(plugin) { + var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} }); + var hasIndex = /\/index$/i.test(plugin); + var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index'; + var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin; + return this.plugin({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config }); }; FrameworkConfiguration.prototype.globalResources = function globalResources(resources) { diff --git a/dist/system/aurelia-framework.js b/dist/system/aurelia-framework.js index 4b1cfe01..075ca48b 100644 --- a/dist/system/aurelia-framework.js +++ b/dist/system/aurelia-framework.js @@ -225,14 +225,12 @@ System.register(['aurelia-logging', 'aurelia-dependency-injection', 'aurelia-loa Aurelia.prototype.start = function start() { var _this = this; - if (this.started) { - return Promise.resolve(this); + if (this._started) { + return this._started; } - this.started = true; this.logger.info('Aurelia Starting'); - - return this.use.apply().then(function () { + return this._started = this.use.apply().then(function () { preventActionlessFormSubmit(); if (!_this.container.hasResolver(BindingLanguage)) { @@ -393,12 +391,13 @@ System.register(['aurelia-logging', 'aurelia-dependency-injection', 'aurelia-loa return this; }; - FrameworkConfiguration.prototype.feature = function feature(plugin, config) { - if (getExt(plugin)) { - return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} }); - } + FrameworkConfiguration.prototype.feature = function feature(plugin) { + var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} }); + var hasIndex = /\/index$/i.test(plugin); + var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index'; + var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin; + return this.plugin({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config }); }; FrameworkConfiguration.prototype.globalResources = function globalResources(resources) { diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 1f091634..d2d71c97 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,18 @@ + +# [1.1.0](https://github.com/aurelia/framework/compare/1.0.8...v1.1.0) (2017-02-27) + + +### Bug Fixes + +* **startup:** start() incorrectly returns a resolved promise ([4ef49e6](https://github.com/aurelia/framework/commit/4ef49e6)) + + +### Features + +* **config:** .feature() accepts explicit /index. ([890f8d5](https://github.com/aurelia/framework/commit/890f8d5)) + + + ## [1.0.2](https://github.com/aurelia/framework/compare/1.0.1...v1.0.2) (2016-08-26) diff --git a/doc/api.json b/doc/api.json index 74aeb4bf..cf4759ce 100644 --- a/doc/api.json +++ b/doc/api.json @@ -1 +1 @@ -{"name":"aurelia-framework","children":[{"id":2,"name":"Aurelia","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"The framework core that provides the main Aurelia object."},"children":[{"id":8,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of Aurelia."},"signatures":[{"id":9,"name":"new Aurelia","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Aurelia."},"parameters":[{"id":10,"name":"loader","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The loader for this Aurelia instance to use. If a loader is not specified, Aurelia will use the loader type specified by PLATFORM.Loader."},"type":{"type":"reference","name":"Loader"}},{"id":11,"name":"container","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The dependency injection container for this Aurelia instance to use. If a container is not specified, Aurelia will create an empty, global container."},"type":{"type":"reference","name":"Container"}},{"id":12,"name":"resources","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The resource registry for this Aurelia instance to use. If a resource registry is not specified, Aurelia will create an empty registry.\n"},"type":{"type":"reference","name":"ViewResources"}}],"type":{"type":"reference","name":"Aurelia","id":2}}]},{"id":5,"name":"container","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The root DI container used by the application."},"type":{"type":"reference","name":"Container"}},{"id":3,"name":"host","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The DOM Element that Aurelia will attach to."},"type":{"type":"reference","name":"Element"}},{"id":4,"name":"loader","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"/**\nThe loader used by the application."},"type":{"type":"reference","name":"Loader"}},{"id":6,"name":"resources","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The global view resources used by the application."},"type":{"type":"reference","name":"ViewResources"}},{"id":7,"name":"use","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The configuration used during application startup."},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}},{"id":15,"name":"enhance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":16,"name":"enhance","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enhances the host's existing elements with behaviors and bindings.","returns":"Returns a Promise for the current Aurelia instance.\n"},"parameters":[{"id":17,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"A binding context for the enhanced elements."},"type":{"type":"reference","name":"Object"}},{"id":18,"name":"applicationHost","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The DOM object that Aurelia will enhance."},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"Element"}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia","id":2}]}}]},{"id":19,"name":"setRoot","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":20,"name":"setRoot","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Instantiates the root component and adds it to the DOM.","returns":"Returns a Promise of the current Aurelia instance.\n"},"parameters":[{"id":21,"name":"root","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The root component to load upon bootstrap."},"type":{"type":"instrinct","name":"string"}},{"id":22,"name":"applicationHost","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The DOM object that Aurelia will attach to."},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"Element"}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia","id":2}]}}]},{"id":13,"name":"start","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":14,"name":"start","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Loads plugins, then resources, and then starts the Aurelia instance.","returns":"Returns a Promise with the started Aurelia instance.\n"},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia","id":2}]}}]}],"groups":[{"title":"Constructors","kind":512,"children":[8]},{"title":"Properties","kind":1024,"children":[5,3,4,6,7]},{"title":"Methods","kind":2048,"children":[15,19,13]}]},{"id":23,"name":"FrameworkConfiguration","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Manages configuring the aurelia framework instance."},"children":[{"id":26,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of FrameworkConfiguration."},"signatures":[{"id":27,"name":"new FrameworkConfiguration","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of FrameworkConfiguration."},"parameters":[{"id":28,"name":"aurelia","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"An instance of Aurelia.\n"},"type":{"type":"reference","name":"Aurelia","id":2}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":25,"name":"aurelia","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The aurelia instance."},"type":{"type":"reference","name":"Aurelia","id":2}},{"id":24,"name":"container","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The root DI container used by the application."},"type":{"type":"reference","name":"Container"}},{"id":78,"name":"apply","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":79,"name":"apply","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Loads and configures the plugins registered with this instance.","returns":"Returns a promise which resolves when all plugins are loaded and configured.\n"},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"instrinct","name":"void"}]}}]},{"id":72,"name":"basicConfiguration","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":73,"name":"basicConfiguration","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets up a basic Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().eventAggregator();`","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":62,"name":"defaultBindingLanguage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":63,"name":"defaultBindingLanguage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the default binding language from aurelia-templating-binding.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":68,"name":"defaultResources","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":69,"name":"defaultResources","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the default templating resources (if, repeat, show, compose, etc.) from aurelia-templating-resources.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":76,"name":"developmentLogging","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":77,"name":"developmentLogging","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the ConsoleAppender and sets the log level to debug.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":70,"name":"eventAggregator","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":71,"name":"eventAggregator","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the event aggregator from aurelia-event-aggregator.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":47,"name":"feature","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":48,"name":"feature","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Configures an internal feature plugin before Aurelia starts.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":49,"name":"plugin","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The folder for the internal plugin to configure (expects an index.js in that folder)."},"type":{"type":"instrinct","name":"string"}},{"id":50,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The configuration for the specified plugin."},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":54,"name":"globalName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":55,"name":"globalName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Renames a global resource that was imported.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":56,"name":"resourcePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The path to the resource."},"type":{"type":"instrinct","name":"string"}},{"id":57,"name":"newName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The new name."},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":51,"name":"globalResources","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":52,"name":"globalResources","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds globally available view resources to be imported into the Aurelia framework.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":53,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The relative module id to the resource. (Relative to the plugin's installer.)"},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","isArray":true,"name":"string"}]}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":66,"name":"history","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":67,"name":"history","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the default history implementation from aurelia-history-browser.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":29,"name":"instance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":30,"name":"instance","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an existing object to the framework's dependency injection container.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":31,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object type of the dependency that the framework will inject."},"type":{"type":"instrinct","name":"any"}},{"id":32,"name":"instance","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The existing instance of the dependency that the framework will inject."},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":58,"name":"plugin","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":59,"name":"plugin","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Configures an external, 3rd party plugin before Aurelia starts.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":60,"name":"plugin","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The ID of the 3rd party plugin to configure."},"type":{"type":"instrinct","name":"string"}},{"id":61,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The configuration for the specified plugin."},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":44,"name":"postTask","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":45,"name":"postTask","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an async function that runs after the plugins are run.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":46,"name":"task","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to run after start."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":41,"name":"preTask","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":42,"name":"preTask","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an async function that runs before the plugins are run.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":43,"name":"task","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to run before start."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":64,"name":"router","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":65,"name":"router","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the router from aurelia-templating-router.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":33,"name":"singleton","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":34,"name":"singleton","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a singleton to the framework's dependency injection container.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":35,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object type of the dependency that the framework will inject."},"type":{"type":"instrinct","name":"any"}},{"id":36,"name":"implementation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The constructor function of the dependency that the framework will inject."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":74,"name":"standardConfiguration","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":75,"name":"standardConfiguration","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets up the standard Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().eventAggregator().history().router();`","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":37,"name":"transient","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":38,"name":"transient","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a transient to the framework's dependency injection container.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":39,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object type of the dependency that the framework will inject."},"type":{"type":"instrinct","name":"any"}},{"id":40,"name":"implementation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The constructor function of the dependency that the framework will inject."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]}],"groups":[{"title":"Constructors","kind":512,"children":[26]},{"title":"Properties","kind":1024,"children":[25,24]},{"title":"Methods","kind":2048,"children":[78,72,62,68,76,70,47,54,51,66,29,58,44,41,64,33,74,37]}]},{"id":80,"name":"LogManager","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"The log manager."},"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Classes","kind":128,"children":[2,23]},{"title":"Variables","kind":32,"children":[80]}]} \ No newline at end of file +{"name":"aurelia-framework","children":[{"id":2,"name":"Aurelia","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"The framework core that provides the main Aurelia object."},"children":[{"id":8,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of Aurelia."},"signatures":[{"id":9,"name":"new Aurelia","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Aurelia."},"parameters":[{"id":10,"name":"loader","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The loader for this Aurelia instance to use. If a loader is not specified, Aurelia will use the loader type specified by PLATFORM.Loader."},"type":{"type":"reference","name":"Loader"}},{"id":11,"name":"container","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The dependency injection container for this Aurelia instance to use. If a container is not specified, Aurelia will create an empty, global container."},"type":{"type":"reference","name":"Container"}},{"id":12,"name":"resources","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The resource registry for this Aurelia instance to use. If a resource registry is not specified, Aurelia will create an empty registry.\n"},"type":{"type":"reference","name":"ViewResources"}}],"type":{"type":"reference","name":"Aurelia","id":2}}]},{"id":5,"name":"container","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The root DI container used by the application."},"type":{"type":"reference","name":"Container"}},{"id":3,"name":"host","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The DOM Element that Aurelia will attach to."},"type":{"type":"reference","name":"Element"}},{"id":4,"name":"loader","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"/**\nThe loader used by the application."},"type":{"type":"reference","name":"Loader"}},{"id":6,"name":"resources","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The global view resources used by the application."},"type":{"type":"reference","name":"ViewResources"}},{"id":7,"name":"use","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The configuration used during application startup."},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}},{"id":15,"name":"enhance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":16,"name":"enhance","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enhances the host's existing elements with behaviors and bindings.","returns":"Returns a Promise for the current Aurelia instance.\n"},"parameters":[{"id":17,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"A binding context for the enhanced elements."},"type":{"type":"reference","name":"Object"}},{"id":18,"name":"applicationHost","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The DOM object that Aurelia will enhance."},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"Element"}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia","id":2}]}}]},{"id":19,"name":"setRoot","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":20,"name":"setRoot","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Instantiates the root component and adds it to the DOM.","returns":"Returns a Promise of the current Aurelia instance.\n"},"parameters":[{"id":21,"name":"root","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The root component to load upon bootstrap."},"type":{"type":"instrinct","name":"string"}},{"id":22,"name":"applicationHost","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The DOM object that Aurelia will attach to."},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"Element"}]}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia","id":2}]}}]},{"id":13,"name":"start","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":14,"name":"start","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Loads plugins, then resources, and then starts the Aurelia instance.","returns":"Returns a Promise with the started Aurelia instance.\n"},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"Aurelia","id":2}]}}]}],"groups":[{"title":"Constructors","kind":512,"children":[8]},{"title":"Properties","kind":1024,"children":[5,3,4,6,7]},{"title":"Methods","kind":2048,"children":[15,19,13]}]},{"id":23,"name":"FrameworkConfiguration","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Manages configuring the aurelia framework instance."},"children":[{"id":26,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of FrameworkConfiguration."},"signatures":[{"id":27,"name":"new FrameworkConfiguration","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of FrameworkConfiguration."},"parameters":[{"id":28,"name":"aurelia","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"An instance of Aurelia.\n"},"type":{"type":"reference","name":"Aurelia","id":2}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":25,"name":"aurelia","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The aurelia instance."},"type":{"type":"reference","name":"Aurelia","id":2}},{"id":24,"name":"container","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The root DI container used by the application."},"type":{"type":"reference","name":"Container"}},{"id":78,"name":"apply","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":79,"name":"apply","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Loads and configures the plugins registered with this instance.","returns":"Returns a promise which resolves when all plugins are loaded and configured.\n"},"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"instrinct","name":"void"}]}}]},{"id":72,"name":"basicConfiguration","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":73,"name":"basicConfiguration","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets up a basic Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().eventAggregator();`","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":62,"name":"defaultBindingLanguage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":63,"name":"defaultBindingLanguage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the default binding language from aurelia-templating-binding.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":68,"name":"defaultResources","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":69,"name":"defaultResources","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the default templating resources (if, repeat, show, compose, etc.) from aurelia-templating-resources.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":76,"name":"developmentLogging","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":77,"name":"developmentLogging","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the ConsoleAppender and sets the log level to debug.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":70,"name":"eventAggregator","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":71,"name":"eventAggregator","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the event aggregator from aurelia-event-aggregator.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":47,"name":"feature","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":48,"name":"feature","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Configures an internal feature plugin before Aurelia starts.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":49,"name":"plugin","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The folder for the internal plugin to configure (expects an index.js in that folder)."},"type":{"type":"instrinct","name":"string"}},{"id":50,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The configuration for the specified plugin."},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":54,"name":"globalName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":55,"name":"globalName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Renames a global resource that was imported.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":56,"name":"resourcePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The path to the resource."},"type":{"type":"instrinct","name":"string"}},{"id":57,"name":"newName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The new name."},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":51,"name":"globalResources","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":52,"name":"globalResources","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds globally available view resources to be imported into the Aurelia framework.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":53,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The relative module id to the resource. (Relative to the plugin's installer.)"},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","isArray":true,"name":"string"}]}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":66,"name":"history","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":67,"name":"history","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the default history implementation from aurelia-history-browser.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":29,"name":"instance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":30,"name":"instance","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an existing object to the framework's dependency injection container.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":31,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object type of the dependency that the framework will inject."},"type":{"type":"instrinct","name":"any"}},{"id":32,"name":"instance","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The existing instance of the dependency that the framework will inject."},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":58,"name":"plugin","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":59,"name":"plugin","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Configures an external, 3rd party plugin before Aurelia starts.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":60,"name":"plugin","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The ID of the 3rd party plugin to configure."},"type":{"type":"instrinct","name":"string"}},{"id":61,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The configuration for the specified plugin."},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":44,"name":"postTask","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":45,"name":"postTask","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an async function that runs after the plugins are run.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":46,"name":"task","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to run after start."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":41,"name":"preTask","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":42,"name":"preTask","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an async function that runs before the plugins are run.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":43,"name":"task","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to run before start."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":64,"name":"router","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":65,"name":"router","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Plugs in the router from aurelia-templating-router.","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":33,"name":"singleton","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":34,"name":"singleton","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a singleton to the framework's dependency injection container.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":35,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object type of the dependency that the framework will inject."},"type":{"type":"instrinct","name":"any"}},{"id":36,"name":"implementation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The constructor function of the dependency that the framework will inject."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":74,"name":"standardConfiguration","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":75,"name":"standardConfiguration","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets up the standard Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().eventAggregator().history().router();`","returns":"Returns the current FrameworkConfiguration instance.\n"},"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]},{"id":37,"name":"transient","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":38,"name":"transient","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a transient to the framework's dependency injection container.","returns":"Returns the current FrameworkConfiguration instance.\n"},"parameters":[{"id":39,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object type of the dependency that the framework will inject."},"type":{"type":"instrinct","name":"any"}},{"id":40,"name":"implementation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The constructor function of the dependency that the framework will inject."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"FrameworkConfiguration","id":23}}]}],"groups":[{"title":"Constructors","kind":512,"children":[26]},{"title":"Properties","kind":1024,"children":[25,24]},{"title":"Methods","kind":2048,"children":[78,72,62,68,76,70,47,54,51,66,29,58,44,41,64,33,74,37]}]}],"groups":[{"title":"Classes","kind":128,"children":[2,23]}]} \ No newline at end of file diff --git a/package.json b/package.json index c1bd0103..01817723 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-framework", - "version": "1.0.8", + "version": "1.1.0", "description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.", "keywords": [ "aurelia",