Skip to content

Commit

Permalink
chore(all): prepare release 1.0.0-beta.1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Mar 29, 2016
1 parent 335f855 commit c4e93cf
Show file tree
Hide file tree
Showing 9 changed files with 190 additions and 68 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.0.0-beta.1.2.0",
"version": "1.0.0-beta.1.2.1",
"description": "The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.",
"keywords": [
"aurelia",
Expand Down
41 changes: 34 additions & 7 deletions dist/amd/aurelia-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
}();

var logger = TheLogManager.getLogger('aurelia');
var extPattern = /\.[^/.]+$/;

function runTasks(config, tasks) {
var current = void 0;
Expand Down Expand Up @@ -301,13 +302,43 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
});

function _normalize(load) {
return aurelia.loader.normalize(load.moduleId, load.relativeTo).then(function (normalized) {
var moduleId = load.moduleId;
var ext = getExt(moduleId);

if (isOtherResource(moduleId)) {
moduleId = removeExt(moduleId);
}

return aurelia.loader.normalize(moduleId, load.relativeTo).then(function (normalized) {
return {
name: load.moduleId,
importId: normalized
importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized
};
});
}

function isOtherResource(name) {
var ext = getExt(name);
if (!ext) return false;
if (ext === '') return false;
if (ext === '.js' || ext === '.ts') return false;
return true;
}

function removeExt(name) {
return name.replace(extPattern, '');
}

function addOriginalExt(normalized, ext) {
return removeExt(normalized) + '.' + ext;
}
}

function getExt(name) {
var match = name.match(extPattern);
if (match && match.length > 0) {
return match[0].split('.')[1];
}
}

function assertProcessed(plugins) {
Expand Down Expand Up @@ -367,15 +398,11 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-m
};

FrameworkConfiguration.prototype.feature = function feature(plugin, config) {
if (hasExt(plugin)) {
if (getExt(plugin)) {
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
}

return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });

function hasExt(name) {
return plugin.split('.').length > 1;
}
};

FrameworkConfiguration.prototype.globalResources = function globalResources(resources) {
Expand Down
41 changes: 34 additions & 7 deletions dist/aurelia-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export class Aurelia {

/*eslint no-unused-vars:0, no-cond-assign:0*/
const logger = TheLogManager.getLogger('aurelia');
const extPattern = /\.[^/.]+$/;

function runTasks(config, tasks) {
let current;
Expand Down Expand Up @@ -228,14 +229,44 @@ function loadResources(aurelia, resourcesToLoad, appResources) {
});

function _normalize(load) {
return aurelia.loader.normalize(load.moduleId, load.relativeTo)
let moduleId = load.moduleId;
let ext = getExt(moduleId);

if (isOtherResource(moduleId)) {
moduleId = removeExt(moduleId);
}

return aurelia.loader.normalize(moduleId, load.relativeTo)
.then(normalized => {
return {
name: load.moduleId,
importId: normalized
importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized
};
});
}

function isOtherResource(name) {
let ext = getExt(name);
if (!ext) return false;
if (ext === '') return false;
if (ext === '.js' || ext === '.ts') return false;
return true;
}

function removeExt(name) {
return name.replace(extPattern, '');
}

function addOriginalExt(normalized, ext) {
return removeExt(normalized) + '.' + ext;
}
}

function getExt(name) {
let match = name.match(extPattern);
if (match && match.length > 0) {
return (match[0].split('.'))[1];
}
}

function assertProcessed(plugins) {
Expand Down Expand Up @@ -336,15 +367,11 @@ export class FrameworkConfiguration {
* @return Returns the current FrameworkConfiguration instance.
*/
feature(plugin: string, config?: any): FrameworkConfiguration {
if (hasExt(plugin)) {
if (getExt(plugin)) {
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
}

return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });

function hasExt(name) {
return (plugin.split('.')).length > 1;
}
}

/**
Expand Down
41 changes: 34 additions & 7 deletions dist/commonjs/aurelia-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ var Aurelia = exports.Aurelia = function () {
}();

var logger = TheLogManager.getLogger('aurelia');
var extPattern = /\.[^/.]+$/;

function runTasks(config, tasks) {
var current = void 0;
Expand Down Expand Up @@ -307,13 +308,43 @@ function loadResources(aurelia, resourcesToLoad, appResources) {
});

function _normalize(load) {
return aurelia.loader.normalize(load.moduleId, load.relativeTo).then(function (normalized) {
var moduleId = load.moduleId;
var ext = getExt(moduleId);

if (isOtherResource(moduleId)) {
moduleId = removeExt(moduleId);
}

return aurelia.loader.normalize(moduleId, load.relativeTo).then(function (normalized) {
return {
name: load.moduleId,
importId: normalized
importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized
};
});
}

function isOtherResource(name) {
var ext = getExt(name);
if (!ext) return false;
if (ext === '') return false;
if (ext === '.js' || ext === '.ts') return false;
return true;
}

function removeExt(name) {
return name.replace(extPattern, '');
}

function addOriginalExt(normalized, ext) {
return removeExt(normalized) + '.' + ext;
}
}

function getExt(name) {
var match = name.match(extPattern);
if (match && match.length > 0) {
return match[0].split('.')[1];
}
}

function assertProcessed(plugins) {
Expand Down Expand Up @@ -373,15 +404,11 @@ var FrameworkConfiguration = function () {
};

FrameworkConfiguration.prototype.feature = function feature(plugin, config) {
if (hasExt(plugin)) {
if (getExt(plugin)) {
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
}

return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });

function hasExt(name) {
return plugin.split('.').length > 1;
}
};

FrameworkConfiguration.prototype.globalResources = function globalResources(resources) {
Expand Down
41 changes: 34 additions & 7 deletions dist/es2015/aurelia-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export let Aurelia = class Aurelia {
};

const logger = TheLogManager.getLogger('aurelia');
const extPattern = /\.[^/.]+$/;

function runTasks(config, tasks) {
let current;
Expand Down Expand Up @@ -181,13 +182,43 @@ function loadResources(aurelia, resourcesToLoad, appResources) {
});

function _normalize(load) {
return aurelia.loader.normalize(load.moduleId, load.relativeTo).then(normalized => {
let moduleId = load.moduleId;
let ext = getExt(moduleId);

if (isOtherResource(moduleId)) {
moduleId = removeExt(moduleId);
}

return aurelia.loader.normalize(moduleId, load.relativeTo).then(normalized => {
return {
name: load.moduleId,
importId: normalized
importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized
};
});
}

function isOtherResource(name) {
let ext = getExt(name);
if (!ext) return false;
if (ext === '') return false;
if (ext === '.js' || ext === '.ts') return false;
return true;
}

function removeExt(name) {
return name.replace(extPattern, '');
}

function addOriginalExt(normalized, ext) {
return removeExt(normalized) + '.' + ext;
}
}

function getExt(name) {
let match = name.match(extPattern);
if (match && match.length > 0) {
return match[0].split('.')[1];
}
}

function assertProcessed(plugins) {
Expand Down Expand Up @@ -237,15 +268,11 @@ export let FrameworkConfiguration = class FrameworkConfiguration {
}

feature(plugin, config) {
if (hasExt(plugin)) {
if (getExt(plugin)) {
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
}

return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });

function hasExt(name) {
return plugin.split('.').length > 1;
}
}

globalResources(resources) {
Expand Down
43 changes: 35 additions & 8 deletions dist/system/aurelia-framework.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

System.register(['aurelia-logging', 'aurelia-dependency-injection', 'aurelia-loader', 'aurelia-templating', 'aurelia-pal', 'aurelia-path', 'aurelia-binding', 'aurelia-metadata', 'aurelia-task-queue'], function (_export, _context) {
var TheLogManager, Container, Loader, BindingLanguage, ViewSlot, ViewResources, TemplatingEngine, CompositionTransaction, ViewEngine, DOM, PLATFORM, join, Aurelia, logger, FrameworkConfiguration, LogManager;
var TheLogManager, Container, Loader, BindingLanguage, ViewSlot, ViewResources, TemplatingEngine, CompositionTransaction, ViewEngine, DOM, PLATFORM, join, Aurelia, logger, extPattern, FrameworkConfiguration, LogManager;

function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
Expand Down Expand Up @@ -80,13 +80,43 @@ System.register(['aurelia-logging', 'aurelia-dependency-injection', 'aurelia-loa
});

function _normalize(load) {
return aurelia.loader.normalize(load.moduleId, load.relativeTo).then(function (normalized) {
var moduleId = load.moduleId;
var ext = getExt(moduleId);

if (isOtherResource(moduleId)) {
moduleId = removeExt(moduleId);
}

return aurelia.loader.normalize(moduleId, load.relativeTo).then(function (normalized) {
return {
name: load.moduleId,
importId: normalized
importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized
};
});
}

function isOtherResource(name) {
var ext = getExt(name);
if (!ext) return false;
if (ext === '') return false;
if (ext === '.js' || ext === '.ts') return false;
return true;
}

function removeExt(name) {
return name.replace(extPattern, '');
}

function addOriginalExt(normalized, ext) {
return removeExt(normalized) + '.' + ext;
}
}

function getExt(name) {
var match = name.match(extPattern);
if (match && match.length > 0) {
return match[0].split('.')[1];
}
}

function assertProcessed(plugins) {
Expand Down Expand Up @@ -303,6 +333,7 @@ System.register(['aurelia-logging', 'aurelia-dependency-injection', 'aurelia-loa
_export('Aurelia', Aurelia);

logger = TheLogManager.getLogger('aurelia');
extPattern = /\.[^/.]+$/;

_export('FrameworkConfiguration', FrameworkConfiguration = function () {
function FrameworkConfiguration(aurelia) {
Expand Down Expand Up @@ -355,15 +386,11 @@ System.register(['aurelia-logging', 'aurelia-dependency-injection', 'aurelia-loa
};

FrameworkConfiguration.prototype.feature = function feature(plugin, config) {
if (hasExt(plugin)) {
if (getExt(plugin)) {
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
}

return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });

function hasExt(name) {
return plugin.split('.').length > 1;
}
};

FrameworkConfiguration.prototype.globalResources = function globalResources(resources) {
Expand Down
10 changes: 10 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### 1.0.0-beta.1.2.1 (2016-03-29)


#### Bug Fixes

* **feature:** use proper parameter to check extension ([c179a3e9](http://github.com/aurelia/framework/commit/c179a3e97565a55a059d86ebb73dcee18732ede1))
* **framework-configuration:** getExt return invalid extension when relative path is supplied ([335f8559](http://github.com/aurelia/framework/commit/335f8559eafaf5df1884489d1e29850669fb2204))
* **global resource:** load resources other than .ts or .js ([b57f290a](http://github.com/aurelia/framework/commit/b57f290ab97d15cc9e0eedd18ec64af97c004e70))


### 1.0.0-beta.1.2.0 (2016-03-22)


Expand Down
Loading

0 comments on commit c4e93cf

Please sign in to comment.