Skip to content

Commit

Permalink
chore(all): prepare release 0.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jan 25, 2015
1 parent 331fcfd commit 9a8861c
Show file tree
Hide file tree
Showing 19 changed files with 201 additions and 48 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-templating",
"version": "0.8.4",
"version": "0.8.5",
"description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.",
"keywords": [
"aurelia",
Expand Down
9 changes: 8 additions & 1 deletion dist/amd/attached-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,16 @@ define(["exports", "aurelia-metadata", "./behavior-instance", "./behaviors", "./
configurable: true
}
}, {
analyze: {
value: function analyze(container, target) {
configureBehavior(container, this, target);
},
writable: true,
enumerable: true,
configurable: true
},
load: {
value: function load(container, target) {
configureBehavior(container, this, target);
return Promise.resolve(this);
},
writable: true,
Expand Down
10 changes: 2 additions & 8 deletions dist/amd/custom-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ define(["exports", "aurelia-metadata", "./behavior-instance", "./behaviors", "./
configurable: true
}
}, {
configure: {
value: function configure(container, target) {
if (this.configured) {
return;
}

analyze: {
value: function analyze(container, target) {
configureBehavior(container, this, target, valuePropertyName);

this.configured = true;
Expand All @@ -82,8 +78,6 @@ define(["exports", "aurelia-metadata", "./behavior-instance", "./behaviors", "./
var _this = this;
var options;

this.configure(container, target);

viewStrategy = viewStrategy || ViewStrategy.getDefault(target);
options = { targetShadowDOM: this.targetShadowDOM };

Expand Down
34 changes: 33 additions & 1 deletion dist/amd/resource-coordinator.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ define(["exports", "aurelia-loader", "aurelia-path", "aurelia-dependency-injecti
throw new Error("No element found in module \"" + moduleImport + "\".");
}

analysis.analyze(container);

for (i = 0, ii = resources.length; i < ii; ++i) {
current = resources[i];
type = current.type;
Expand All @@ -119,7 +121,6 @@ define(["exports", "aurelia-loader", "aurelia-path", "aurelia-dependency-injecti
cache[analysis.id] = analysis;

return Promise.all(loads).then(function () {
analysis.element.type.configure(container, analysis.element.value);
return analysis.element;
});
});
Expand All @@ -141,12 +142,15 @@ define(["exports", "aurelia-loader", "aurelia-path", "aurelia-dependency-injecti
analysis,
type;

var container = this.container;

for (i = 0, ii = imports.length; i < ii; ++i) {
current = imports[i];
annotation = Origin.get(current);

if (!annotation) {
analysis = analyzeModule({ "default": current });
analysis.analyze(container);
type = (analysis.element || analysis.resources[0]).type;

if (resourceManifestUrl) {
Expand Down Expand Up @@ -230,6 +234,7 @@ define(["exports", "aurelia-loader", "aurelia-path", "aurelia-dependency-injecti
}

analysis = analyzeModule(imports[i]);
analysis.analyze(container);
existing[analysis.id] = analysis;
allAnalysis[i] = analysis;
resources = analysis.resources;
Expand Down Expand Up @@ -290,6 +295,33 @@ define(["exports", "aurelia-loader", "aurelia-path", "aurelia-dependency-injecti
}

_prototypeProperties(ResourceModule, null, {
analyze: {
value: function analyze(container) {
var current = this.element,
resources = this.resources,
i,
ii;

if (current) {
if (!current.type.isAnalyzed) {
current.type.isAnalyzed = true;
current.type.analyze(container, current.value);
}
}

for (i = 0, ii = resources.length; i < ii; ++i) {
current = resources[i];

if ("analyze" in current.type && !current.type.isAnalyzed) {
current.type.isAnalyzed = true;
current.type.analyze(container, current.value);
}
}
},
writable: true,
enumerable: true,
configurable: true
},
register: {
value: function register(registry, name) {
var i,
Expand Down
9 changes: 8 additions & 1 deletion dist/amd/template-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,16 @@ define(["exports", "aurelia-metadata", "./behavior-instance", "./behaviors", "./
configurable: true
}
}, {
analyze: {
value: function analyze(container, target) {
configureBehavior(container, this, target);
},
writable: true,
enumerable: true,
configurable: true
},
load: {
value: function load(container, target) {
configureBehavior(container, this, target);
return Promise.resolve(this);
},
writable: true,
Expand Down
9 changes: 8 additions & 1 deletion dist/commonjs/attached-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,16 @@ var AttachedBehavior = (function (ResourceType) {
configurable: true
}
}, {
analyze: {
value: function analyze(container, target) {
configureBehavior(container, this, target);
},
writable: true,
enumerable: true,
configurable: true
},
load: {
value: function load(container, target) {
configureBehavior(container, this, target);
return Promise.resolve(this);
},
writable: true,
Expand Down
10 changes: 2 additions & 8 deletions dist/commonjs/custom-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,8 @@ var CustomElement = (function (ResourceType) {
configurable: true
}
}, {
configure: {
value: function configure(container, target) {
if (this.configured) {
return;
}

analyze: {
value: function analyze(container, target) {
configureBehavior(container, this, target, valuePropertyName);

this.configured = true;
Expand All @@ -81,8 +77,6 @@ var CustomElement = (function (ResourceType) {
var _this = this;
var options;

this.configure(container, target);

viewStrategy = viewStrategy || ViewStrategy.getDefault(target);
options = { targetShadowDOM: this.targetShadowDOM };

Expand Down
34 changes: 33 additions & 1 deletion dist/commonjs/resource-coordinator.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ var ResourceCoordinator = (function () {
throw new Error("No element found in module \"" + moduleImport + "\".");
}

analysis.analyze(container);

for (i = 0, ii = resources.length; i < ii; ++i) {
current = resources[i];
type = current.type;
Expand All @@ -118,7 +120,6 @@ var ResourceCoordinator = (function () {
cache[analysis.id] = analysis;

return Promise.all(loads).then(function () {
analysis.element.type.configure(container, analysis.element.value);
return analysis.element;
});
});
Expand All @@ -140,12 +141,15 @@ var ResourceCoordinator = (function () {
analysis,
type;

var container = this.container;

for (i = 0, ii = imports.length; i < ii; ++i) {
current = imports[i];
annotation = Origin.get(current);

if (!annotation) {
analysis = analyzeModule({ "default": current });
analysis.analyze(container);
type = (analysis.element || analysis.resources[0]).type;

if (resourceManifestUrl) {
Expand Down Expand Up @@ -229,6 +233,7 @@ var ResourceCoordinator = (function () {
}

analysis = analyzeModule(imports[i]);
analysis.analyze(container);
existing[analysis.id] = analysis;
allAnalysis[i] = analysis;
resources = analysis.resources;
Expand Down Expand Up @@ -289,6 +294,33 @@ var ResourceModule = (function () {
}

_prototypeProperties(ResourceModule, null, {
analyze: {
value: function analyze(container) {
var current = this.element,
resources = this.resources,
i,
ii;

if (current) {
if (!current.type.isAnalyzed) {
current.type.isAnalyzed = true;
current.type.analyze(container, current.value);
}
}

for (i = 0, ii = resources.length; i < ii; ++i) {
current = resources[i];

if ("analyze" in current.type && !current.type.isAnalyzed) {
current.type.isAnalyzed = true;
current.type.analyze(container, current.value);
}
}
},
writable: true,
enumerable: true,
configurable: true
},
register: {
value: function register(registry, name) {
var i,
Expand Down
9 changes: 8 additions & 1 deletion dist/commonjs/template-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,16 @@ var TemplateController = (function (ResourceType) {
configurable: true
}
}, {
analyze: {
value: function analyze(container, target) {
configureBehavior(container, this, target);
},
writable: true,
enumerable: true,
configurable: true
},
load: {
value: function load(container, target) {
configureBehavior(container, this, target);
return Promise.resolve(this);
},
writable: true,
Expand Down
5 changes: 4 additions & 1 deletion dist/es6/attached-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ export class AttachedBehavior extends ResourceType {
}
}

load(container, target){
analyze(container, target){
configureBehavior(container, this, target);
}

load(container, target){
return Promise.resolve(this);
}

Expand Down
8 changes: 1 addition & 7 deletions dist/es6/custom-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ export class CustomElement extends ResourceType {
}
}

configure(container, target){
if(this.configured){
return;
}

analyze(container, target){
configureBehavior(container, this, target, valuePropertyName);

this.configured = true;
Expand All @@ -41,8 +37,6 @@ export class CustomElement extends ResourceType {
load(container, target, viewStrategy){
var options;

this.configure(container, target);

viewStrategy = viewStrategy || ViewStrategy.getDefault(target);
options = { targetShadowDOM:this.targetShadowDOM };

Expand Down
33 changes: 29 additions & 4 deletions dist/es6/resource-coordinator.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export class ResourceCoordinator {
throw new Error(`No element found in module "${moduleImport}".`);
}

analysis.analyze(container);

for(i = 0, ii = resources.length; i < ii; ++i){
current = resources[i];
type = current.type;
Expand All @@ -78,10 +80,7 @@ export class ResourceCoordinator {

cache[analysis.id] = analysis;

return Promise.all(loads).then(() => {
analysis.element.type.configure(container, analysis.element.value);
return analysis.element;
});
return Promise.all(loads).then(() => analysis.element);
});
}

Expand All @@ -91,12 +90,15 @@ export class ResourceCoordinator {
finalModules = [],
importIds = [], analysis, type;

var container = this.container;

for(i = 0, ii = imports.length; i < ii; ++i){
current = imports[i];
annotation = Origin.get(current);

if(!annotation){
analysis = analyzeModule({'default':current});
analysis.analyze(container);
type = (analysis.element || analysis.resources[0]).type;

if(resourceManifestUrl){
Expand Down Expand Up @@ -162,6 +164,7 @@ export class ResourceCoordinator {
}

analysis = analyzeModule(imports[i]);
analysis.analyze(container);
existing[analysis.id] = analysis;
allAnalysis[i] = analysis;
resources = analysis.resources;
Expand Down Expand Up @@ -211,6 +214,28 @@ class ResourceModule {
}
}

analyze(container){
var current = this.element,
resources = this.resources,
i, ii;

if(current){
if(!current.type.isAnalyzed){
current.type.isAnalyzed = true;
current.type.analyze(container, current.value);
}
}

for(i = 0, ii = resources.length; i < ii; ++i){
current = resources[i];

if('analyze' in current.type && !current.type.isAnalyzed){
current.type.isAnalyzed = true;
current.type.analyze(container, current.value);
}
}
}

register(registry, name){
var i, ii, resources = this.resources;

Expand Down
5 changes: 4 additions & 1 deletion dist/es6/template-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ export class TemplateController extends ResourceType {
}
}

load(container, target){
analyze(container, target){
configureBehavior(container, this, target);
}

load(container, target){
return Promise.resolve(this);
}

Expand Down
Loading

0 comments on commit 9a8861c

Please sign in to comment.