Skip to content

Commit b0252e7

Browse files
chore(all): prepare release 1.1.0
1 parent bde8ffc commit b0252e7

File tree

10 files changed

+78
-65
lines changed

10 files changed

+78
-65
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.0.8",
3+
"version": "1.1.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: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,12 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
130130
Aurelia.prototype.start = function start() {
131131
var _this = this;
132132

133-
if (this.started) {
134-
return Promise.resolve(this);
133+
if (this._started) {
134+
return this._started;
135135
}
136136

137-
this.started = true;
138137
this.logger.info('Aurelia Starting');
139-
140-
return this.use.apply().then(function () {
138+
return this._started = this.use.apply().then(function () {
141139
preventActionlessFormSubmit();
142140

143141
if (!_this.container.hasResolver(_aureliaTemplating.BindingLanguage)) {
@@ -402,12 +400,13 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
402400
return this;
403401
};
404402

405-
FrameworkConfiguration.prototype.feature = function feature(plugin, config) {
406-
if (getExt(plugin)) {
407-
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
408-
}
403+
FrameworkConfiguration.prototype.feature = function feature(plugin) {
404+
var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
409405

410-
return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });
406+
var hasIndex = /\/index$/i.test(plugin);
407+
var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';
408+
var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin;
409+
return this.plugin({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config });
411410
};
412411

413412
FrameworkConfiguration.prototype.globalResources = function globalResources(resources) {

dist/aurelia-framework.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,12 @@ export class Aurelia {
6868
* @return Returns a Promise with the started Aurelia instance.
6969
*/
7070
start(): Promise<Aurelia> {
71-
if (this.started) {
72-
return Promise.resolve(this);
71+
if (this._started) {
72+
return this._started;
7373
}
7474

75-
this.started = true;
7675
this.logger.info('Aurelia Starting');
77-
78-
return this.use.apply().then(() => {
76+
return this._started = this.use.apply().then(() => {
7977
preventActionlessFormSubmit();
8078

8179
if (!this.container.hasResolver(BindingLanguage)) {
@@ -378,12 +376,11 @@ export class FrameworkConfiguration {
378376
* @param config The configuration for the specified plugin.
379377
* @return Returns the current FrameworkConfiguration instance.
380378
*/
381-
feature(plugin: string, config?: any): FrameworkConfiguration {
382-
if (getExt(plugin)) {
383-
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
384-
}
385-
386-
return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });
379+
feature(plugin: string, config?: any = {}): FrameworkConfiguration {
380+
let hasIndex = /\/index$/i.test(plugin);
381+
let moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';
382+
let root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin;
383+
return this.plugin({ moduleId, resourcesRelativeTo: [root, ''], config });
387384
}
388385

389386
/**
@@ -461,6 +458,14 @@ export class FrameworkConfiguration {
461458
return this;
462459
}
463460

461+
// Default configuration helpers
462+
// Note: Please do NOT add PLATFORM.moduleName() around those module names.
463+
// Those functions are not guaranteed to be called, they are here to faciliate
464+
// common configurations. If they are not called, we don't want to include a
465+
// static dependency on those modules.
466+
// Including those modules in the bundle or not is a decision that must be
467+
// taken by the bundling tool, at build time.
468+
464469
/**
465470
* Plugs in the default binding language from aurelia-templating-binding.
466471
* @return Returns the current FrameworkConfiguration instance.

dist/commonjs/aurelia-framework.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,12 @@ var Aurelia = exports.Aurelia = function () {
140140
Aurelia.prototype.start = function start() {
141141
var _this = this;
142142

143-
if (this.started) {
144-
return Promise.resolve(this);
143+
if (this._started) {
144+
return this._started;
145145
}
146146

147-
this.started = true;
148147
this.logger.info('Aurelia Starting');
149-
150-
return this.use.apply().then(function () {
148+
return this._started = this.use.apply().then(function () {
151149
preventActionlessFormSubmit();
152150

153151
if (!_this.container.hasResolver(_aureliaTemplating.BindingLanguage)) {
@@ -412,12 +410,13 @@ var FrameworkConfiguration = function () {
412410
return this;
413411
};
414412

415-
FrameworkConfiguration.prototype.feature = function feature(plugin, config) {
416-
if (getExt(plugin)) {
417-
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
418-
}
413+
FrameworkConfiguration.prototype.feature = function feature(plugin) {
414+
var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
419415

420-
return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });
416+
var hasIndex = /\/index$/i.test(plugin);
417+
var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';
418+
var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin;
419+
return this.plugin({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config });
421420
};
422421

423422
FrameworkConfiguration.prototype.globalResources = function globalResources(resources) {

dist/es2015/aurelia-framework.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ export let Aurelia = class Aurelia {
3232
}
3333

3434
start() {
35-
if (this.started) {
36-
return Promise.resolve(this);
35+
if (this._started) {
36+
return this._started;
3737
}
3838

39-
this.started = true;
4039
this.logger.info('Aurelia Starting');
41-
42-
return this.use.apply().then(() => {
40+
return this._started = this.use.apply().then(() => {
4341
preventActionlessFormSubmit();
4442

4543
if (!this.container.hasResolver(BindingLanguage)) {
@@ -276,12 +274,11 @@ export let FrameworkConfiguration = class FrameworkConfiguration {
276274
return this;
277275
}
278276

279-
feature(plugin, config) {
280-
if (getExt(plugin)) {
281-
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
282-
}
283-
284-
return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });
277+
feature(plugin, config = {}) {
278+
let hasIndex = /\/index$/i.test(plugin);
279+
let moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';
280+
let root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin;
281+
return this.plugin({ moduleId, resourcesRelativeTo: [root, ''], config });
285282
}
286283

287284
globalResources(resources) {

dist/native-modules/aurelia-framework.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,12 @@ export var Aurelia = function () {
3838
Aurelia.prototype.start = function start() {
3939
var _this = this;
4040

41-
if (this.started) {
42-
return Promise.resolve(this);
41+
if (this._started) {
42+
return this._started;
4343
}
4444

45-
this.started = true;
4645
this.logger.info('Aurelia Starting');
47-
48-
return this.use.apply().then(function () {
46+
return this._started = this.use.apply().then(function () {
4947
preventActionlessFormSubmit();
5048

5149
if (!_this.container.hasResolver(BindingLanguage)) {
@@ -310,12 +308,13 @@ var FrameworkConfiguration = function () {
310308
return this;
311309
};
312310

313-
FrameworkConfiguration.prototype.feature = function feature(plugin, config) {
314-
if (getExt(plugin)) {
315-
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
316-
}
311+
FrameworkConfiguration.prototype.feature = function feature(plugin) {
312+
var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
317313

318-
return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });
314+
var hasIndex = /\/index$/i.test(plugin);
315+
var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';
316+
var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin;
317+
return this.plugin({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config });
319318
};
320319

321320
FrameworkConfiguration.prototype.globalResources = function globalResources(resources) {

dist/system/aurelia-framework.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,12 @@ System.register(['aurelia-logging', 'aurelia-dependency-injection', 'aurelia-loa
225225
Aurelia.prototype.start = function start() {
226226
var _this = this;
227227

228-
if (this.started) {
229-
return Promise.resolve(this);
228+
if (this._started) {
229+
return this._started;
230230
}
231231

232-
this.started = true;
233232
this.logger.info('Aurelia Starting');
234-
235-
return this.use.apply().then(function () {
233+
return this._started = this.use.apply().then(function () {
236234
preventActionlessFormSubmit();
237235

238236
if (!_this.container.hasResolver(BindingLanguage)) {
@@ -393,12 +391,13 @@ System.register(['aurelia-logging', 'aurelia-dependency-injection', 'aurelia-loa
393391
return this;
394392
};
395393

396-
FrameworkConfiguration.prototype.feature = function feature(plugin, config) {
397-
if (getExt(plugin)) {
398-
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
399-
}
394+
FrameworkConfiguration.prototype.feature = function feature(plugin) {
395+
var config = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
400396

401-
return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });
397+
var hasIndex = /\/index$/i.test(plugin);
398+
var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';
399+
var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin;
400+
return this.plugin({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config });
402401
};
403402

404403
FrameworkConfiguration.prototype.globalResources = function globalResources(resources) {

doc/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
<a name="1.1.0"></a>
2+
# [1.1.0](https://github.com/aurelia/framework/compare/1.0.8...v1.1.0) (2017-02-27)
3+
4+
5+
### Bug Fixes
6+
7+
* **startup:** start() incorrectly returns a resolved promise ([4ef49e6](https://github.com/aurelia/framework/commit/4ef49e6))
8+
9+
10+
### Features
11+
12+
* **config:** .feature() accepts explicit /index. ([890f8d5](https://github.com/aurelia/framework/commit/890f8d5))
13+
14+
15+
116
<a name="1.0.2"></a>
217
## [1.0.2](https://github.com/aurelia/framework/compare/1.0.1...v1.0.2) (2016-08-26)
318

doc/api.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

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

0 commit comments

Comments
 (0)