Skip to content

Commit c14b8b2

Browse files
chore(all): prepare release 1.2.0
1 parent 5e71de5 commit c14b8b2

File tree

12 files changed

+144
-80
lines changed

12 files changed

+144
-80
lines changed

bower.json

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

dist/amd/aurelia-framework.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
154154
Aurelia.prototype.enhance = function enhance() {
155155
var _this2 = this;
156156

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

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

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

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

177177
var instruction = {};
178178

@@ -401,7 +401,7 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
401401
};
402402

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

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

500-
FrameworkConfiguration.prototype.developmentLogging = function developmentLogging() {
500+
FrameworkConfiguration.prototype.developmentLogging = function developmentLogging(level) {
501501
var _this6 = this;
502502

503+
var logLevel = level ? TheLogManager.logLevel[level] : undefined;
504+
505+
if (logLevel === undefined) {
506+
logLevel = TheLogManager.logLevel.debug;
507+
}
508+
503509
this.preTask(function () {
504510
return _this6.aurelia.loader.normalize('aurelia-logging-console', _this6.bootstrapperName).then(function (name) {
505511
return _this6.aurelia.loader.loadModule(name).then(function (m) {
506512
TheLogManager.addAppender(new m.ConsoleAppender());
507-
TheLogManager.setLevel(TheLogManager.logLevel.debug);
513+
TheLogManager.setLevel(logLevel);
508514
});
509515
});
510516
});

dist/aurelia-framework.d.ts

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,55 +26,55 @@ import {
2626
* The framework core that provides the main Aurelia object.
2727
*/
2828
export declare class Aurelia {
29-
29+
3030
/**
3131
* The DOM Element that Aurelia will attach to.
3232
*/
3333
host: Element;
34-
34+
3535
/**
3636
/**
3737
* The loader used by the application.
3838
*/
3939
loader: Loader;
40-
40+
4141
/**
4242
* The root DI container used by the application.
4343
*/
4444
container: Container;
45-
45+
4646
/**
4747
* The global view resources used by the application.
4848
*/
4949
resources: ViewResources;
50-
50+
5151
/**
5252
* The configuration used during application startup.
5353
*/
5454
use: FrameworkConfiguration;
55-
55+
5656
/**
5757
* Creates an instance of Aurelia.
5858
* @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.
5959
* @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.
6060
* @param resources The resource registry for this Aurelia instance to use. If a resource registry is not specified, Aurelia will create an empty registry.
6161
*/
6262
constructor(loader?: Loader, container?: Container, resources?: ViewResources);
63-
63+
6464
/**
6565
* Loads plugins, then resources, and then starts the Aurelia instance.
6666
* @return Returns a Promise with the started Aurelia instance.
6767
*/
6868
start(): Promise<Aurelia>;
69-
69+
7070
/**
7171
* Enhances the host's existing elements with behaviors and bindings.
7272
* @param bindingContext A binding context for the enhanced elements.
7373
* @param applicationHost The DOM object that Aurelia will enhance.
7474
* @return Returns a Promise for the current Aurelia instance.
7575
*/
7676
enhance(bindingContext?: Object, applicationHost?: string | Element): Promise<Aurelia>;
77-
77+
7878
/**
7979
* Instantiates the root component and adds it to the DOM.
8080
* @param root The root component to load upon bootstrap.
@@ -88,140 +88,148 @@ export declare class Aurelia {
8888
* Manages configuring the aurelia framework instance.
8989
*/
9090
export declare class FrameworkConfiguration {
91-
91+
9292
/**
9393
* The root DI container used by the application.
9494
*/
9595
container: Container;
96-
96+
9797
/**
9898
* The aurelia instance.
9999
*/
100100
aurelia: Aurelia;
101-
101+
102102
/**
103103
* Creates an instance of FrameworkConfiguration.
104104
* @param aurelia An instance of Aurelia.
105105
*/
106106
constructor(aurelia: Aurelia);
107-
107+
108108
/**
109109
* Adds an existing object to the framework's dependency injection container.
110110
* @param type The object type of the dependency that the framework will inject.
111111
* @param instance The existing instance of the dependency that the framework will inject.
112112
* @return Returns the current FrameworkConfiguration instance.
113113
*/
114114
instance(type: any, instance: any): FrameworkConfiguration;
115-
115+
116116
/**
117117
* Adds a singleton to the framework's dependency injection container.
118118
* @param type The object type of the dependency that the framework will inject.
119119
* @param implementation The constructor function of the dependency that the framework will inject.
120120
* @return Returns the current FrameworkConfiguration instance.
121121
*/
122122
singleton(type: any, implementation?: Function): FrameworkConfiguration;
123-
123+
124124
/**
125125
* Adds a transient to the framework's dependency injection container.
126126
* @param type The object type of the dependency that the framework will inject.
127127
* @param implementation The constructor function of the dependency that the framework will inject.
128128
* @return Returns the current FrameworkConfiguration instance.
129129
*/
130130
transient(type: any, implementation?: Function): FrameworkConfiguration;
131-
131+
132132
/**
133133
* Adds an async function that runs before the plugins are run.
134134
* @param task The function to run before start.
135135
* @return Returns the current FrameworkConfiguration instance.
136136
*/
137137
preTask(task: Function): FrameworkConfiguration;
138-
138+
139139
/**
140140
* Adds an async function that runs after the plugins are run.
141141
* @param task The function to run after start.
142142
* @return Returns the current FrameworkConfiguration instance.
143143
*/
144144
postTask(task: Function): FrameworkConfiguration;
145-
145+
146146
/**
147147
* Configures an internal feature plugin before Aurelia starts.
148148
* @param plugin The folder for the internal plugin to configure (expects an index.js in that folder).
149149
* @param config The configuration for the specified plugin.
150150
* @return Returns the current FrameworkConfiguration instance.
151151
*/
152152
feature(plugin: string, config?: any): FrameworkConfiguration;
153-
153+
154154
/**
155155
* Adds globally available view resources to be imported into the Aurelia framework.
156156
* @param resources The relative module id to the resource. (Relative to the plugin's installer.)
157157
* @return Returns the current FrameworkConfiguration instance.
158158
*/
159159
globalResources(resources: string | string[]): FrameworkConfiguration;
160-
160+
161161
/**
162162
* Renames a global resource that was imported.
163163
* @param resourcePath The path to the resource.
164164
* @param newName The new name.
165165
* @return Returns the current FrameworkConfiguration instance.
166166
*/
167167
globalName(resourcePath: string, newName: string): FrameworkConfiguration;
168-
168+
169169
/**
170170
* Configures an external, 3rd party plugin before Aurelia starts.
171171
* @param plugin The ID of the 3rd party plugin to configure.
172172
* @param config The configuration for the specified plugin.
173173
* @return Returns the current FrameworkConfiguration instance.
174174
*/
175175
plugin(plugin: string, config?: any): FrameworkConfiguration;
176-
176+
177+
// Default configuration helpers
178+
// Note: Please do NOT add PLATFORM.moduleName() around those module names.
179+
// Those functions are not guaranteed to be called, they are here to faciliate
180+
// common configurations. If they are not called, we don't want to include a
181+
// static dependency on those modules.
182+
// Including those modules in the bundle or not is a decision that must be
183+
// taken by the bundling tool, at build time.
177184
/**
178185
* Plugs in the default binding language from aurelia-templating-binding.
179186
* @return Returns the current FrameworkConfiguration instance.
180187
*/
181188
defaultBindingLanguage(): FrameworkConfiguration;
182-
189+
183190
/**
184191
* Plugs in the router from aurelia-templating-router.
185192
* @return Returns the current FrameworkConfiguration instance.
186193
*/
187194
router(): FrameworkConfiguration;
188-
195+
189196
/**
190197
* Plugs in the default history implementation from aurelia-history-browser.
191198
* @return Returns the current FrameworkConfiguration instance.
192199
*/
193200
history(): FrameworkConfiguration;
194-
201+
195202
/**
196203
* Plugs in the default templating resources (if, repeat, show, compose, etc.) from aurelia-templating-resources.
197204
* @return Returns the current FrameworkConfiguration instance.
198205
*/
199206
defaultResources(): FrameworkConfiguration;
200-
207+
201208
/**
202209
* Plugs in the event aggregator from aurelia-event-aggregator.
203210
* @return Returns the current FrameworkConfiguration instance.
204211
*/
205212
eventAggregator(): FrameworkConfiguration;
206-
213+
207214
/**
208215
* Sets up a basic Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().eventAggregator();`
209216
* @return Returns the current FrameworkConfiguration instance.
210217
*/
211218
basicConfiguration(): FrameworkConfiguration;
212-
219+
213220
/**
214221
* Sets up the standard Aurelia configuration. This is equivalent to calling `.defaultBindingLanguage().defaultResources().eventAggregator().history().router();`
215222
* @return Returns the current FrameworkConfiguration instance.
216223
*/
217224
standardConfiguration(): FrameworkConfiguration;
218-
225+
219226
/**
220227
* Plugs in the ConsoleAppender and sets the log level to debug.
228+
* @param level The log level (none/error/warn/info/debug), default to 'debug'.
221229
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
222230
*/
223-
developmentLogging(): FrameworkConfiguration;
224-
231+
developmentLogging(level?: String): FrameworkConfiguration;
232+
225233
/**
226234
* Loads and configures the plugins registered with this instance.
227235
* @return Returns a promise which resolves when all plugins are loaded and configured.
@@ -235,8 +243,8 @@ export * from 'aurelia-templating';
235243
export * from 'aurelia-loader';
236244
export * from 'aurelia-task-queue';
237245
export * from 'aurelia-path';
238-
export * from 'aurelia-pal';
239246
/**
240-
* The log manager.
241-
*/
242-
export const LogManager: any;
247+
* The log manager.
248+
*/
249+
export const LogManager: typeof TheLogManager;
250+
export * from 'aurelia-pal';

dist/aurelia-framework.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,21 @@ export class FrameworkConfiguration {
524524

525525
/**
526526
* Plugs in the ConsoleAppender and sets the log level to debug.
527+
* @param level The log level (none/error/warn/info/debug), default to 'debug'.
527528
* @return {FrameworkConfiguration} Returns the current FrameworkConfiguration instance.
528529
*/
529-
developmentLogging(): FrameworkConfiguration {
530+
developmentLogging(level?: String): FrameworkConfiguration {
531+
let logLevel = level ? TheLogManager.logLevel[level] : undefined;
532+
533+
if (logLevel === undefined) {
534+
logLevel = TheLogManager.logLevel.debug;
535+
}
536+
530537
this.preTask(() => {
531538
return this.aurelia.loader.normalize('aurelia-logging-console', this.bootstrapperName).then(name => {
532539
return this.aurelia.loader.loadModule(name).then(m => {
533540
TheLogManager.addAppender(new m.ConsoleAppender());
534-
TheLogManager.setLevel(TheLogManager.logLevel.debug);
541+
TheLogManager.setLevel(logLevel);
535542
});
536543
});
537544
});

dist/commonjs/aurelia-framework.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ var Aurelia = exports.Aurelia = function () {
164164
Aurelia.prototype.enhance = function enhance() {
165165
var _this2 = this;
166166

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

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

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

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

187187
var instruction = {};
188188

@@ -411,7 +411,7 @@ var FrameworkConfiguration = function () {
411411
};
412412

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

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

510-
FrameworkConfiguration.prototype.developmentLogging = function developmentLogging() {
510+
FrameworkConfiguration.prototype.developmentLogging = function developmentLogging(level) {
511511
var _this6 = this;
512512

513+
var logLevel = level ? TheLogManager.logLevel[level] : undefined;
514+
515+
if (logLevel === undefined) {
516+
logLevel = TheLogManager.logLevel.debug;
517+
}
518+
513519
this.preTask(function () {
514520
return _this6.aurelia.loader.normalize('aurelia-logging-console', _this6.bootstrapperName).then(function (name) {
515521
return _this6.aurelia.loader.loadModule(name).then(function (m) {
516522
TheLogManager.addAppender(new m.ConsoleAppender());
517-
TheLogManager.setLevel(TheLogManager.logLevel.debug);
523+
TheLogManager.setLevel(logLevel);
518524
});
519525
});
520526
});

0 commit comments

Comments
 (0)