Skip to content

Commit

Permalink
chore(all): prepare release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Mar 29, 2018
1 parent 5e71de5 commit c14b8b2
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 80 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-framework",
"version": "1.1.5",
"version": "1.2.0",
"description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.",
"keywords": [
"aurelia",
Expand Down
20 changes: 13 additions & 7 deletions dist/amd/aurelia-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
Aurelia.prototype.enhance = function enhance() {
var _this2 = this;

var bindingContext = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var applicationHost = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
var bindingContext = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var applicationHost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

this._configureHost(applicationHost || _aureliaPal.DOM.querySelectorAll('body')[0]);

Expand All @@ -171,8 +171,8 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
Aurelia.prototype.setRoot = function setRoot() {
var _this3 = this;

var root = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];
var applicationHost = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var applicationHost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

var instruction = {};

Expand Down Expand Up @@ -401,7 +401,7 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
};

FrameworkConfiguration.prototype.feature = function feature(plugin) {
var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

var hasIndex = /\/index$/i.test(plugin);
var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';
Expand Down Expand Up @@ -497,14 +497,20 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
return this.basicConfiguration().history().router();
};

FrameworkConfiguration.prototype.developmentLogging = function developmentLogging() {
FrameworkConfiguration.prototype.developmentLogging = function developmentLogging(level) {
var _this6 = this;

var logLevel = level ? TheLogManager.logLevel[level] : undefined;

if (logLevel === undefined) {
logLevel = TheLogManager.logLevel.debug;
}

this.preTask(function () {
return _this6.aurelia.loader.normalize('aurelia-logging-console', _this6.bootstrapperName).then(function (name) {
return _this6.aurelia.loader.loadModule(name).then(function (m) {
TheLogManager.addAppender(new m.ConsoleAppender());
TheLogManager.setLevel(TheLogManager.logLevel.debug);
TheLogManager.setLevel(logLevel);
});
});
});
Expand Down
78 changes: 43 additions & 35 deletions dist/aurelia-framework.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,55 +26,55 @@ import {
* The framework core that provides the main Aurelia object.
*/
export declare class Aurelia {

/**
* The DOM Element that Aurelia will attach to.
*/
host: Element;

/**
/**
* The loader used by the application.
*/
loader: Loader;

/**
* The root DI container used by the application.
*/
container: Container;

/**
* The global view resources used by the application.
*/
resources: ViewResources;

/**
* The configuration used during application startup.
*/
use: FrameworkConfiguration;

/**
* Creates an instance of Aurelia.
* @param loader The loader for this Aurelia instance to use. If a loader is not specified, Aurelia will use the loader type specified by PLATFORM.Loader.
* @param container The dependency injection container for this Aurelia instance to use. If a container is not specified, Aurelia will create an empty, global container.
* @param resources The resource registry for this Aurelia instance to use. If a resource registry is not specified, Aurelia will create an empty registry.
*/
constructor(loader?: Loader, container?: Container, resources?: ViewResources);

/**
* Loads plugins, then resources, and then starts the Aurelia instance.
* @return Returns a Promise with the started Aurelia instance.
*/
start(): Promise<Aurelia>;

/**
* Enhances the host's existing elements with behaviors and bindings.
* @param bindingContext A binding context for the enhanced elements.
* @param applicationHost The DOM object that Aurelia will enhance.
* @return Returns a Promise for the current Aurelia instance.
*/
enhance(bindingContext?: Object, applicationHost?: string | Element): Promise<Aurelia>;

/**
* Instantiates the root component and adds it to the DOM.
* @param root The root component to load upon bootstrap.
Expand All @@ -88,140 +88,148 @@ export declare class Aurelia {
* Manages configuring the aurelia framework instance.
*/
export declare class FrameworkConfiguration {

/**
* The root DI container used by the application.
*/
container: Container;

/**
* The aurelia instance.
*/
aurelia: Aurelia;

/**
* Creates an instance of FrameworkConfiguration.
* @param aurelia An instance of Aurelia.
*/
constructor(aurelia: Aurelia);

/**
* Adds an existing object to the framework's dependency injection container.
* @param type The object type of the dependency that the framework will inject.
* @param instance The existing instance of the dependency that the framework will inject.
* @return Returns the current FrameworkConfiguration instance.
*/
instance(type: any, instance: any): FrameworkConfiguration;

/**
* Adds a singleton to the framework's dependency injection container.
* @param type The object type of the dependency that the framework will inject.
* @param implementation The constructor function of the dependency that the framework will inject.
* @return Returns the current FrameworkConfiguration instance.
*/
singleton(type: any, implementation?: Function): FrameworkConfiguration;

/**
* Adds a transient to the framework's dependency injection container.
* @param type The object type of the dependency that the framework will inject.
* @param implementation The constructor function of the dependency that the framework will inject.
* @return Returns the current FrameworkConfiguration instance.
*/
transient(type: any, implementation?: Function): FrameworkConfiguration;

/**
* Adds an async function that runs before the plugins are run.
* @param task The function to run before start.
* @return Returns the current FrameworkConfiguration instance.
*/
preTask(task: Function): FrameworkConfiguration;

/**
* Adds an async function that runs after the plugins are run.
* @param task The function to run after start.
* @return Returns the current FrameworkConfiguration instance.
*/
postTask(task: Function): FrameworkConfiguration;

/**
* Configures an internal feature plugin before Aurelia starts.
* @param plugin The folder for the internal plugin to configure (expects an index.js in that folder).
* @param config The configuration for the specified plugin.
* @return Returns the current FrameworkConfiguration instance.
*/
feature(plugin: string, config?: any): FrameworkConfiguration;

/**
* Adds globally available view resources to be imported into the Aurelia framework.
* @param resources The relative module id to the resource. (Relative to the plugin's installer.)
* @return Returns the current FrameworkConfiguration instance.
*/
globalResources(resources: string | string[]): FrameworkConfiguration;

/**
* Renames a global resource that was imported.
* @param resourcePath The path to the resource.
* @param newName The new name.
* @return Returns the current FrameworkConfiguration instance.
*/
globalName(resourcePath: string, newName: string): FrameworkConfiguration;

/**
* Configures an external, 3rd party plugin before Aurelia starts.
* @param plugin The ID of the 3rd party plugin to configure.
* @param config The configuration for the specified plugin.
* @return Returns the current FrameworkConfiguration instance.
*/
plugin(plugin: string, config?: any): FrameworkConfiguration;


// 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.
*/
defaultBindingLanguage(): FrameworkConfiguration;

/**
* Plugs in the router from aurelia-templating-router.
* @return Returns the current FrameworkConfiguration instance.
*/
router(): FrameworkConfiguration;

/**
* Plugs in the default history implementation from aurelia-history-browser.
* @return Returns the current FrameworkConfiguration instance.
*/
history(): FrameworkConfiguration;

/**
* Plugs in the default templating resources (if, repeat, show, compose, etc.) from aurelia-templating-resources.
* @return Returns the current FrameworkConfiguration instance.
*/
defaultResources(): FrameworkConfiguration;

/**
* Plugs in the event aggregator from aurelia-event-aggregator.
* @return Returns the current FrameworkConfiguration instance.
*/
eventAggregator(): FrameworkConfiguration;

/**
* Sets up a basic Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().eventAggregator();`
* @return Returns the current FrameworkConfiguration instance.
*/
basicConfiguration(): FrameworkConfiguration;

/**
* Sets up the standard Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().eventAggregator().history().router();`
* @return Returns the current FrameworkConfiguration instance.
*/
standardConfiguration(): FrameworkConfiguration;

/**
* Plugs in the ConsoleAppender and sets the log level to debug.
* @param level The log level (none/error/warn/info/debug), default to 'debug'.
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
*/
developmentLogging(): FrameworkConfiguration;

developmentLogging(level?: String): FrameworkConfiguration;
/**
* Loads and configures the plugins registered with this instance.
* @return Returns a promise which resolves when all plugins are loaded and configured.
Expand All @@ -235,8 +243,8 @@ export * from 'aurelia-templating';
export * from 'aurelia-loader';
export * from 'aurelia-task-queue';
export * from 'aurelia-path';
export * from 'aurelia-pal';
/**
* The log manager.
*/
export const LogManager: any;
* The log manager.
*/
export const LogManager: typeof TheLogManager;
export * from 'aurelia-pal';
11 changes: 9 additions & 2 deletions dist/aurelia-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,14 +524,21 @@ export class FrameworkConfiguration {

/**
* Plugs in the ConsoleAppender and sets the log level to debug.
* @param level The log level (none/error/warn/info/debug), default to 'debug'.
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
*/
developmentLogging(): FrameworkConfiguration {
developmentLogging(level?: String): FrameworkConfiguration {
let logLevel = level ? TheLogManager.logLevel[level] : undefined;

if (logLevel === undefined) {
logLevel = TheLogManager.logLevel.debug;
}

this.preTask(() => {
return this.aurelia.loader.normalize('aurelia-logging-console', this.bootstrapperName).then(name => {
return this.aurelia.loader.loadModule(name).then(m => {
TheLogManager.addAppender(new m.ConsoleAppender());
TheLogManager.setLevel(TheLogManager.logLevel.debug);
TheLogManager.setLevel(logLevel);
});
});
});
Expand Down
20 changes: 13 additions & 7 deletions dist/commonjs/aurelia-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ var Aurelia = exports.Aurelia = function () {
Aurelia.prototype.enhance = function enhance() {
var _this2 = this;

var bindingContext = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var applicationHost = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
var bindingContext = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var applicationHost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

this._configureHost(applicationHost || _aureliaPal.DOM.querySelectorAll('body')[0]);

Expand All @@ -181,8 +181,8 @@ var Aurelia = exports.Aurelia = function () {
Aurelia.prototype.setRoot = function setRoot() {
var _this3 = this;

var root = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];
var applicationHost = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var applicationHost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

var instruction = {};

Expand Down Expand Up @@ -411,7 +411,7 @@ var FrameworkConfiguration = function () {
};

FrameworkConfiguration.prototype.feature = function feature(plugin) {
var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

var hasIndex = /\/index$/i.test(plugin);
var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';
Expand Down Expand Up @@ -507,14 +507,20 @@ var FrameworkConfiguration = function () {
return this.basicConfiguration().history().router();
};

FrameworkConfiguration.prototype.developmentLogging = function developmentLogging() {
FrameworkConfiguration.prototype.developmentLogging = function developmentLogging(level) {
var _this6 = this;

var logLevel = level ? TheLogManager.logLevel[level] : undefined;

if (logLevel === undefined) {
logLevel = TheLogManager.logLevel.debug;
}

this.preTask(function () {
return _this6.aurelia.loader.normalize('aurelia-logging-console', _this6.bootstrapperName).then(function (name) {
return _this6.aurelia.loader.loadModule(name).then(function (m) {
TheLogManager.addAppender(new m.ConsoleAppender());
TheLogManager.setLevel(TheLogManager.logLevel.debug);
TheLogManager.setLevel(logLevel);
});
});
});
Expand Down

0 comments on commit c14b8b2

Please sign in to comment.