diff --git a/bower.json b/bower.json index 0cb3207..5b1d18a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-bootstrapper", - "version": "1.0.0-beta.1.1.1", + "version": "1.0.0-beta.1.1.2", "description": "Sets up the default configuration for the aurelia framework and gets you up and running quick and easy.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-bootstrapper.js b/dist/amd/aurelia-bootstrapper.js index 9f8b0b5..acd2c35 100644 --- a/dist/amd/aurelia-bootstrapper.js +++ b/dist/amd/aurelia-bootstrapper.js @@ -29,13 +29,13 @@ define(['exports', 'core-js', 'aurelia-pal', 'aurelia-pal-browser'], function (e if (global.document.readyState === 'complete') { resolve(global.document); } else { - global.document.addEventListener('DOMContentLoaded', completed, false); - global.addEventListener('load', completed, false); + global.document.addEventListener('DOMContentLoaded', completed); + global.addEventListener('load', completed); } function completed() { - global.document.removeEventListener('DOMContentLoaded', completed, false); - global.removeEventListener('load', completed, false); + global.document.removeEventListener('DOMContentLoaded', completed); + global.removeEventListener('load', completed); resolve(global.document); } }); @@ -88,30 +88,23 @@ define(['exports', 'core-js', 'aurelia-pal', 'aurelia-pal-browser'], function (e } function handleApp(loader, appHost) { - var configModuleId = appHost.getAttribute('aurelia-app'); - return configModuleId ? customConfig(loader, appHost, configModuleId) : defaultConfig(loader, appHost); + return config(loader, appHost, appHost.getAttribute('aurelia-app')); } - function customConfig(loader, appHost, configModuleId) { - return loader.loadModule(configModuleId).then(function (m) { - var aurelia = new Aurelia(loader); - aurelia.host = appHost; - return m.configure(aurelia); - }); - } - - function defaultConfig(loader, appHost) { + function config(loader, appHost, configModuleId) { var aurelia = new Aurelia(loader); aurelia.host = appHost; - if (window.location.protocol !== 'http' && window.location.protocol !== 'https') { - aurelia.use.developmentLogging(); + if (configModuleId) { + return loader.loadModule(configModuleId).then(function (customConfig) { + return customConfig.configure(aurelia); + }); } - aurelia.use.standardConfiguration(); + aurelia.use.standardConfiguration().developmentLogging(); - return aurelia.start().then(function (a) { - return a.setRoot(); + return aurelia.start().then(function () { + return aurelia.setRoot(); }); } diff --git a/dist/aurelia-bootstrapper.js b/dist/aurelia-bootstrapper.js index 2acfdac..4e2a3fc 100644 --- a/dist/aurelia-bootstrapper.js +++ b/dist/aurelia-bootstrapper.js @@ -27,13 +27,13 @@ function ready(global) { if (global.document.readyState === 'complete') { resolve(global.document); } else { - global.document.addEventListener('DOMContentLoaded', completed, false); - global.addEventListener('load', completed, false); + global.document.addEventListener('DOMContentLoaded', completed); + global.addEventListener('load', completed); } function completed() { - global.document.removeEventListener('DOMContentLoaded', completed, false); - global.removeEventListener('load', completed, false); + global.document.removeEventListener('DOMContentLoaded', completed); + global.removeEventListener('load', completed); resolve(global.document); } }); @@ -79,37 +79,29 @@ function preparePlatform(loader) { } function handleApp(loader, appHost) { - let configModuleId = appHost.getAttribute('aurelia-app'); - return configModuleId ? customConfig(loader, appHost, configModuleId) : defaultConfig(loader, appHost); + return config(loader, appHost, appHost.getAttribute('aurelia-app')); } -function customConfig(loader, appHost, configModuleId) { - return loader.loadModule(configModuleId) - .then(m => { - let aurelia = new Aurelia(loader); - aurelia.host = appHost; - return m.configure(aurelia); - }); -} - -function defaultConfig(loader, appHost) { - let aurelia = new Aurelia(loader); +function config(loader, appHost, configModuleId) { + const aurelia = new Aurelia(loader); aurelia.host = appHost; - if (window.location.protocol !== 'http' && window.location.protocol !== 'https') { - aurelia.use.developmentLogging(); + if (configModuleId) { + return loader.loadModule(configModuleId).then(customConfig => customConfig.configure(aurelia)); } - aurelia.use.standardConfiguration(); + aurelia.use + .standardConfiguration() + .developmentLogging(); - return aurelia.start().then(a => a.setRoot()); + return aurelia.start().then(() => aurelia.setRoot()); } function run() { return ready(window).then(doc => { initialize(); - let appHost = doc.querySelectorAll('[aurelia-app]'); + const appHost = doc.querySelectorAll('[aurelia-app]'); return createLoader().then(loader => { return preparePlatform(loader).then(() => { for (let i = 0, ii = appHost.length; i < ii; ++i) { @@ -133,7 +125,7 @@ function run() { */ export function bootstrap(configure: Function): Promise { return onBootstrap(loader => { - let aurelia = new Aurelia(loader); + const aurelia = new Aurelia(loader); return configure(aurelia); }); } diff --git a/dist/commonjs/aurelia-bootstrapper.js b/dist/commonjs/aurelia-bootstrapper.js index 1141cf7..75413d1 100644 --- a/dist/commonjs/aurelia-bootstrapper.js +++ b/dist/commonjs/aurelia-bootstrapper.js @@ -34,13 +34,13 @@ function ready(global) { if (global.document.readyState === 'complete') { resolve(global.document); } else { - global.document.addEventListener('DOMContentLoaded', completed, false); - global.addEventListener('load', completed, false); + global.document.addEventListener('DOMContentLoaded', completed); + global.addEventListener('load', completed); } function completed() { - global.document.removeEventListener('DOMContentLoaded', completed, false); - global.removeEventListener('load', completed, false); + global.document.removeEventListener('DOMContentLoaded', completed); + global.removeEventListener('load', completed); resolve(global.document); } }); @@ -93,30 +93,23 @@ function preparePlatform(loader) { } function handleApp(loader, appHost) { - var configModuleId = appHost.getAttribute('aurelia-app'); - return configModuleId ? customConfig(loader, appHost, configModuleId) : defaultConfig(loader, appHost); + return config(loader, appHost, appHost.getAttribute('aurelia-app')); } -function customConfig(loader, appHost, configModuleId) { - return loader.loadModule(configModuleId).then(function (m) { - var aurelia = new Aurelia(loader); - aurelia.host = appHost; - return m.configure(aurelia); - }); -} - -function defaultConfig(loader, appHost) { +function config(loader, appHost, configModuleId) { var aurelia = new Aurelia(loader); aurelia.host = appHost; - if (window.location.protocol !== 'http' && window.location.protocol !== 'https') { - aurelia.use.developmentLogging(); + if (configModuleId) { + return loader.loadModule(configModuleId).then(function (customConfig) { + return customConfig.configure(aurelia); + }); } - aurelia.use.standardConfiguration(); + aurelia.use.standardConfiguration().developmentLogging(); - return aurelia.start().then(function (a) { - return a.setRoot(); + return aurelia.start().then(function () { + return aurelia.setRoot(); }); } diff --git a/dist/es6/aurelia-bootstrapper.js b/dist/es6/aurelia-bootstrapper.js index 2acfdac..4e2a3fc 100644 --- a/dist/es6/aurelia-bootstrapper.js +++ b/dist/es6/aurelia-bootstrapper.js @@ -27,13 +27,13 @@ function ready(global) { if (global.document.readyState === 'complete') { resolve(global.document); } else { - global.document.addEventListener('DOMContentLoaded', completed, false); - global.addEventListener('load', completed, false); + global.document.addEventListener('DOMContentLoaded', completed); + global.addEventListener('load', completed); } function completed() { - global.document.removeEventListener('DOMContentLoaded', completed, false); - global.removeEventListener('load', completed, false); + global.document.removeEventListener('DOMContentLoaded', completed); + global.removeEventListener('load', completed); resolve(global.document); } }); @@ -79,37 +79,29 @@ function preparePlatform(loader) { } function handleApp(loader, appHost) { - let configModuleId = appHost.getAttribute('aurelia-app'); - return configModuleId ? customConfig(loader, appHost, configModuleId) : defaultConfig(loader, appHost); + return config(loader, appHost, appHost.getAttribute('aurelia-app')); } -function customConfig(loader, appHost, configModuleId) { - return loader.loadModule(configModuleId) - .then(m => { - let aurelia = new Aurelia(loader); - aurelia.host = appHost; - return m.configure(aurelia); - }); -} - -function defaultConfig(loader, appHost) { - let aurelia = new Aurelia(loader); +function config(loader, appHost, configModuleId) { + const aurelia = new Aurelia(loader); aurelia.host = appHost; - if (window.location.protocol !== 'http' && window.location.protocol !== 'https') { - aurelia.use.developmentLogging(); + if (configModuleId) { + return loader.loadModule(configModuleId).then(customConfig => customConfig.configure(aurelia)); } - aurelia.use.standardConfiguration(); + aurelia.use + .standardConfiguration() + .developmentLogging(); - return aurelia.start().then(a => a.setRoot()); + return aurelia.start().then(() => aurelia.setRoot()); } function run() { return ready(window).then(doc => { initialize(); - let appHost = doc.querySelectorAll('[aurelia-app]'); + const appHost = doc.querySelectorAll('[aurelia-app]'); return createLoader().then(loader => { return preparePlatform(loader).then(() => { for (let i = 0, ii = appHost.length; i < ii; ++i) { @@ -133,7 +125,7 @@ function run() { */ export function bootstrap(configure: Function): Promise { return onBootstrap(loader => { - let aurelia = new Aurelia(loader); + const aurelia = new Aurelia(loader); return configure(aurelia); }); } diff --git a/dist/system/aurelia-bootstrapper.js b/dist/system/aurelia-bootstrapper.js index 9b489da..74a56a9 100644 --- a/dist/system/aurelia-bootstrapper.js +++ b/dist/system/aurelia-bootstrapper.js @@ -26,13 +26,13 @@ System.register(['core-js', 'aurelia-pal', 'aurelia-pal-browser'], function (_ex if (global.document.readyState === 'complete') { resolve(global.document); } else { - global.document.addEventListener('DOMContentLoaded', completed, false); - global.addEventListener('load', completed, false); + global.document.addEventListener('DOMContentLoaded', completed); + global.addEventListener('load', completed); } function completed() { - global.document.removeEventListener('DOMContentLoaded', completed, false); - global.removeEventListener('load', completed, false); + global.document.removeEventListener('DOMContentLoaded', completed); + global.removeEventListener('load', completed); resolve(global.document); } }); @@ -85,30 +85,23 @@ System.register(['core-js', 'aurelia-pal', 'aurelia-pal-browser'], function (_ex } function handleApp(loader, appHost) { - var configModuleId = appHost.getAttribute('aurelia-app'); - return configModuleId ? customConfig(loader, appHost, configModuleId) : defaultConfig(loader, appHost); + return config(loader, appHost, appHost.getAttribute('aurelia-app')); } - function customConfig(loader, appHost, configModuleId) { - return loader.loadModule(configModuleId).then(function (m) { - var aurelia = new Aurelia(loader); - aurelia.host = appHost; - return m.configure(aurelia); - }); - } - - function defaultConfig(loader, appHost) { + function config(loader, appHost, configModuleId) { var aurelia = new Aurelia(loader); aurelia.host = appHost; - if (window.location.protocol !== 'http' && window.location.protocol !== 'https') { - aurelia.use.developmentLogging(); + if (configModuleId) { + return loader.loadModule(configModuleId).then(function (customConfig) { + return customConfig.configure(aurelia); + }); } - aurelia.use.standardConfiguration(); + aurelia.use.standardConfiguration().developmentLogging(); - return aurelia.start().then(function (a) { - return a.setRoot(); + return aurelia.start().then(function () { + return aurelia.setRoot(); }); } diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 310d380..8568ad2 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,12 @@ +### 1.0.0-beta.1.1.2 (2016-02-08) + + +#### Bug Fixes + +* **index:** remove check for localhost ([0f769f4b](http://github.com/aurelia/bootstrapper/commit/0f769f4b88ed96d7a8c4e67181241a5bccb4e881)) +* **lint:** fix eslint config ([a25b4b4e](http://github.com/aurelia/bootstrapper/commit/a25b4b4e662b22af8724347ba62d994274171c4f)) + + ### 1.0.0-beta.1.1.0 (2016-01-29) diff --git a/package.json b/package.json index 0310f3f..35bb887 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-bootstrapper", - "version": "1.0.0-beta.1.1.1", + "version": "1.0.0-beta.1.1.2", "description": "Sets up the default configuration for the aurelia framework and gets you up and running quick and easy.", "keywords": [ "aurelia",