-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add bootstrap code from test project
- Loading branch information
Showing
18 changed files
with
388 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
System.config({ | ||
"baseURL": "/", | ||
"transpiler": "babel", | ||
"babelOptions": { | ||
"optional": [ | ||
"es7.classProperties", | ||
"es7.decorators", | ||
"runtime" | ||
] | ||
}, | ||
"paths": { | ||
"*": "*.js", | ||
"github:*": "jspm_packages/github/*.js", | ||
"npm:*": "jspm_packages/npm/*.js", | ||
"dialog/*": "dist/commonjs/*.js" | ||
} | ||
}); | ||
|
||
System.config({ | ||
"map": { | ||
"aurelia-framework": "github:aurelia/[email protected]", | ||
"aurelia-templating-binding": "github:aurelia/[email protected]", | ||
"babel": "npm:[email protected]", | ||
"babel-runtime": "npm:[email protected]", | ||
"core-js": "npm:[email protected]", | ||
"traceur": "github:jmcriffey/[email protected]", | ||
"traceur-runtime": "github:jmcriffey/[email protected]", | ||
"github:aurelia/[email protected]": { | ||
"aurelia-dependency-injection": "github:aurelia/[email protected]", | ||
"aurelia-metadata": "github:aurelia/[email protected]", | ||
"aurelia-task-queue": "github:aurelia/[email protected]", | ||
"core-js": "npm:[email protected]" | ||
}, | ||
"github:aurelia/[email protected]": { | ||
"aurelia-logging": "github:aurelia/[email protected]", | ||
"aurelia-metadata": "github:aurelia/[email protected]", | ||
"core-js": "npm:[email protected]" | ||
}, | ||
"github:aurelia/[email protected]": { | ||
"aurelia-binding": "github:aurelia/[email protected]", | ||
"aurelia-dependency-injection": "github:aurelia/[email protected]", | ||
"aurelia-loader": "github:aurelia/[email protected]", | ||
"aurelia-logging": "github:aurelia/[email protected]", | ||
"aurelia-metadata": "github:aurelia/[email protected]", | ||
"aurelia-path": "github:aurelia/[email protected]", | ||
"aurelia-task-queue": "github:aurelia/[email protected]", | ||
"aurelia-templating": "github:aurelia/[email protected]", | ||
"core-js": "npm:[email protected]" | ||
}, | ||
"github:aurelia/[email protected]": { | ||
"aurelia-html-template-element": "github:aurelia/[email protected]", | ||
"aurelia-metadata": "github:aurelia/[email protected]", | ||
"aurelia-path": "github:aurelia/[email protected]", | ||
"core-js": "npm:[email protected]", | ||
"webcomponentsjs": "github:webcomponents/[email protected]" | ||
}, | ||
"github:aurelia/[email protected]": { | ||
"core-js": "npm:[email protected]" | ||
}, | ||
"github:aurelia/[email protected]": { | ||
"aurelia-binding": "github:aurelia/[email protected]", | ||
"aurelia-logging": "github:aurelia/[email protected]", | ||
"aurelia-templating": "github:aurelia/[email protected]" | ||
}, | ||
"github:aurelia/[email protected]": { | ||
"aurelia-binding": "github:aurelia/[email protected]", | ||
"aurelia-dependency-injection": "github:aurelia/[email protected]", | ||
"aurelia-html-template-element": "github:aurelia/[email protected]", | ||
"aurelia-loader": "github:aurelia/[email protected]", | ||
"aurelia-logging": "github:aurelia/[email protected]", | ||
"aurelia-metadata": "github:aurelia/[email protected]", | ||
"aurelia-path": "github:aurelia/[email protected]", | ||
"aurelia-task-queue": "github:aurelia/[email protected]", | ||
"core-js": "npm:[email protected]" | ||
}, | ||
"github:jspm/[email protected]": { | ||
"process": "npm:[email protected]" | ||
}, | ||
"npm:[email protected]": { | ||
"process": "github:jspm/[email protected]" | ||
}, | ||
"npm:[email protected]": { | ||
"fs": "github:jspm/[email protected]", | ||
"process": "github:jspm/[email protected]", | ||
"systemjs-json": "github:systemjs/[email protected]" | ||
} | ||
} | ||
}); | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,58 @@ | ||
define(['exports'], function (exports) { | ||
define(['exports', 'aurelia-framework', 'aurelia-templating-binding'], function (exports, _aureliaFramework, _aureliaTemplatingBinding) { | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
exports.configure = configure; | ||
|
||
function registerElement(eventManager, bindingLanguage, prototype) { | ||
var propertyConfig = { 'bind-value': ['change'] }; | ||
|
||
function handleProp(propName, prop) { | ||
if (prop.notify) { | ||
propertyConfig[propName] = ['change']; | ||
} | ||
} | ||
|
||
Object.keys(prototype.properties).forEach(function (propName) { | ||
return handleProp(propName, prototype.properties[propName]); | ||
}); | ||
|
||
prototype.behaviors.forEach(function (behavior) { | ||
if (typeof behavior.properties != 'undefined') { | ||
Object.keys(behavior.properties).forEach(function (propName) { | ||
return handleProp(propName, behavior.properties[propName]); | ||
}); | ||
} | ||
}); | ||
|
||
eventManager.registerElementConfig({ | ||
tagName: prototype.is, | ||
properties: propertyConfig | ||
}); | ||
} | ||
|
||
function configure(aurelia) { | ||
aurelia.globalizeResources('./hello-world'); | ||
var eventManager = aurelia.container.get(_aureliaFramework.EventManager); | ||
var bindingLanguage = aurelia.container.get(_aureliaTemplatingBinding.TemplatingBindingLanguage); | ||
var observerLocator = aurelia.container.get(_aureliaFramework.ObserverLocator); | ||
|
||
bindingLanguage.attributeMap['bind-value'] = 'bindValue'; | ||
|
||
var registrations = Polymer.telemetry.observations; | ||
registrations.forEach(function (prototype) { | ||
return registerElement(eventManager, bindingLanguage, prototype); | ||
}); | ||
observerLocator.getArrayObserver(registrations).subscribe(function (changes) { | ||
changes.forEach(function (change) { | ||
if (change.type === "splice" && change.addedCount > 0) { | ||
for (var i = 0; i < change.addedCount; i++) { | ||
var prototype = change.object[change.index + i - 1]; | ||
registerElement(eventManager, bindingLanguage, prototype); | ||
} | ||
} | ||
}); | ||
}); | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,48 @@ | ||
import {EventManager, ObserverLocator} from 'aurelia-framework'; | ||
import {TemplatingBindingLanguage} from 'aurelia-templating-binding'; | ||
|
||
function registerElement(eventManager, bindingLanguage, prototype) { | ||
var propertyConfig = {'bind-value': ['change']}; // Not explicitly listed for all elements that use it | ||
|
||
function handleProp(propName, prop) { | ||
if (prop.notify) { | ||
propertyConfig[propName] = ['change']; | ||
} | ||
} | ||
|
||
Object.keys(prototype.properties) | ||
.forEach(propName => handleProp(propName, prototype.properties[propName])); | ||
|
||
prototype.behaviors.forEach(behavior => { | ||
if (typeof behavior.properties != 'undefined') { | ||
Object.keys(behavior.properties) | ||
.forEach(propName => handleProp(propName, behavior.properties[propName])); | ||
} | ||
}); | ||
|
||
eventManager.registerElementConfig({ | ||
tagName: prototype.is, | ||
properties: propertyConfig | ||
}); | ||
} | ||
|
||
export function configure(aurelia){ | ||
aurelia.globalizeResources('./hello-world'); | ||
let eventManager = aurelia.container.get(EventManager); | ||
let bindingLanguage = aurelia.container.get(TemplatingBindingLanguage); | ||
let observerLocator = aurelia.container.get(ObserverLocator); | ||
|
||
bindingLanguage.attributeMap['bind-value'] = 'bindValue'; | ||
|
||
let registrations = Polymer.telemetry.observations; | ||
registrations.forEach(prototype => registerElement(eventManager, bindingLanguage, prototype)); | ||
observerLocator.getArrayObserver(registrations).subscribe(changes => { | ||
changes.forEach(change => { | ||
if (change.type === "splice" && change.addedCount > 0) { | ||
for (let i = 0; i < change.addedCount; i++) { | ||
let prototype = change.object[change.index + i - 1]; | ||
registerElement(eventManager, bindingLanguage, prototype); | ||
} | ||
} | ||
}); | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.