-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f043981
Showing
46 changed files
with
26,116 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"sourceMap": true, | ||
"moduleIds": false, | ||
"comments": false, | ||
"compact": false, | ||
"code": true, | ||
"presets": [ "es2015-loose", "stage-1"], | ||
"plugins": [ | ||
"syntax-flow", | ||
"transform-decorators-legacy", | ||
"transform-flow-strip-types" | ||
] | ||
} |
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,14 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# 2 space indentation | ||
[**.*] | ||
indent_style = space | ||
indent_size = 2 |
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,3 @@ | ||
{ | ||
"extends": "./node_modules/aurelia-tools/.eslintrc.json" | ||
} |
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,3 @@ | ||
node_modules | ||
.idea | ||
.DS_STORE |
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,142 @@ | ||
{ | ||
"name": "aurelia-app", | ||
"type": "project:application", | ||
"platform": { | ||
"id": "web", | ||
"displayName": "Web", | ||
"output": "scripts", | ||
"index": "index.html" | ||
}, | ||
"transpiler": { | ||
"id": "babel", | ||
"displayName": "Babel", | ||
"fileExtension": ".js", | ||
"options": { | ||
"plugins": [ | ||
"transform-es2015-modules-amd" | ||
] | ||
}, | ||
"source": "src/**/*.js" | ||
}, | ||
"markupProcessor": { | ||
"id": "none", | ||
"displayName": "None", | ||
"fileExtension": ".html", | ||
"source": "src/**/*.html" | ||
}, | ||
"cssProcessor": { | ||
"id": "none", | ||
"displayName": "None", | ||
"fileExtension": ".css", | ||
"source": "src/**/*.css" | ||
}, | ||
"editor": { | ||
"id": "webstorm", | ||
"displayName": "WebStorm" | ||
}, | ||
"unitTestRunner": { | ||
"id": "karma", | ||
"displayName": "Karma", | ||
"source": "test/unit/**/*.js" | ||
}, | ||
"paths": { | ||
"root": "src", | ||
"resources": "src/resources", | ||
"elements": "src/resources/elements", | ||
"attributes": "src/resources/attributes", | ||
"valueConverters": "src/resources/value-converters", | ||
"bindingBehaviors": "src/resources/binding-behaviors" | ||
}, | ||
"testFramework": { | ||
"id": "jasmine", | ||
"displayName": "Jasmine" | ||
}, | ||
"build": { | ||
"targets": [ | ||
{ | ||
"id": "web", | ||
"displayName": "Web", | ||
"output": "scripts", | ||
"index": "index.html" | ||
} | ||
], | ||
"loader": { | ||
"type": "require", | ||
"configTarget": "vendor-bundle.js", | ||
"includeBundleMetadataInConfig": "auto", | ||
"plugins": [ | ||
{ | ||
"name": "text", | ||
"extensions": [ | ||
".html", | ||
".css" | ||
], | ||
"stub": true | ||
} | ||
] | ||
}, | ||
"options": { | ||
"minify": "stage & prod", | ||
"sourcemaps": "dev & stage" | ||
}, | ||
"bundles": [ | ||
{ | ||
"name": "app-bundle.js", | ||
"source": [ | ||
"[**/*.js]", | ||
"**/*.{css,html}" | ||
] | ||
}, | ||
{ | ||
"name": "vendor-bundle.js", | ||
"prepend": [ | ||
"node_modules/bluebird/js/browser/bluebird.core.js", | ||
"scripts/require.js" | ||
], | ||
"dependencies": [ | ||
"aurelia-binding", | ||
"aurelia-bootstrapper", | ||
"aurelia-dependency-injection", | ||
"aurelia-event-aggregator", | ||
"aurelia-framework", | ||
"aurelia-history", | ||
"aurelia-history-browser", | ||
"aurelia-loader", | ||
"aurelia-loader-default", | ||
"aurelia-logging", | ||
"aurelia-logging-console", | ||
"aurelia-metadata", | ||
"aurelia-pal", | ||
"aurelia-pal-browser", | ||
"aurelia-path", | ||
"aurelia-polyfills", | ||
"aurelia-route-recognizer", | ||
"aurelia-router", | ||
"aurelia-task-queue", | ||
"aurelia-templating", | ||
"aurelia-templating-binding", | ||
{ | ||
"name": "text", | ||
"path": "../scripts/text" | ||
}, | ||
{ | ||
"name": "aurelia-templating-resources", | ||
"path": "../node_modules/aurelia-templating-resources/dist/amd", | ||
"main": "aurelia-templating-resources" | ||
}, | ||
{ | ||
"name": "aurelia-templating-router", | ||
"path": "../node_modules/aurelia-templating-router/dist/amd", | ||
"main": "aurelia-templating-router" | ||
}, | ||
{ | ||
"name": "aurelia-testing", | ||
"path": "../node_modules/aurelia-testing/dist/amd", | ||
"main": "aurelia-testing", | ||
"env": "dev" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
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,4 @@ | ||
export default { | ||
debug: true, | ||
testing: true | ||
}; |
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,4 @@ | ||
export default { | ||
debug: false, | ||
testing: false | ||
}; |
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,4 @@ | ||
export default { | ||
debug: true, | ||
testing: false | ||
}; |
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,44 @@ | ||
import {inject} from 'aurelia-dependency-injection'; | ||
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; | ||
|
||
@inject(Project, CLIOptions, UI) | ||
export default class AttributeGenerator { | ||
constructor(project, options, ui) { | ||
this.project = project; | ||
this.options = options; | ||
this.ui = ui; | ||
} | ||
|
||
execute() { | ||
return this.ui | ||
.ensureAnswer(this.options.args[0], 'What would you like to call the custom attribute?') | ||
.then(name => { | ||
let fileName = this.project.makeFileName(name); | ||
let className = this.project.makeClassName(name); | ||
|
||
this.project.attributes.add( | ||
ProjectItem.text(`${fileName}.js`, this.generateSource(className)) | ||
); | ||
|
||
return this.project.commitChanges() | ||
.then(() => this.ui.log(`Created ${fileName}.`)); | ||
}); | ||
} | ||
|
||
generateSource(className) { | ||
return `import {inject} from 'aurelia-framework'; | ||
@inject(Element) | ||
export class ${className}CustomAttribute { | ||
constructor(element) { | ||
this.element = element; | ||
} | ||
valueChanged(newValue, oldValue) { | ||
} | ||
} | ||
`; | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"name": "attribute", | ||
"description": "Creates a custom attribute class and places it in the project resources." | ||
} |
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,41 @@ | ||
import {inject} from 'aurelia-dependency-injection'; | ||
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; | ||
|
||
@inject(Project, CLIOptions, UI) | ||
export default class BindingBehaviorGenerator { | ||
constructor(project, options, ui) { | ||
this.project = project; | ||
this.options = options; | ||
this.ui = ui; | ||
} | ||
|
||
execute() { | ||
return this.ui | ||
.ensureAnswer(this.options.args[0], 'What would you like to call the binding behavior?') | ||
.then(name => { | ||
let fileName = this.project.makeFileName(name); | ||
let className = this.project.makeClassName(name); | ||
|
||
this.project.bindingBehaviors.add( | ||
ProjectItem.text(`${fileName}.js`, this.generateSource(className)) | ||
); | ||
|
||
return this.project.commitChanges() | ||
.then(() => this.ui.log(`Created ${fileName}.`)); | ||
}); | ||
} | ||
|
||
generateSource(className) { | ||
return `export class ${className}BindingBehavior { | ||
bind(binding, source) { | ||
} | ||
unbind(binding, source) { | ||
} | ||
} | ||
` | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"name": "binding-behavior", | ||
"description": "Creates a binding behavior class and places it in the project resources." | ||
} |
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,48 @@ | ||
import {inject} from 'aurelia-dependency-injection'; | ||
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; | ||
|
||
@inject(Project, CLIOptions, UI) | ||
export default class ElementGenerator { | ||
constructor(project, options, ui) { | ||
this.project = project; | ||
this.options = options; | ||
this.ui = ui; | ||
} | ||
|
||
execute() { | ||
return this.ui | ||
.ensureAnswer(this.options.args[0], 'What would you like to call the custom element?') | ||
.then(name => { | ||
let fileName = this.project.makeFileName(name); | ||
let className = this.project.makeClassName(name); | ||
|
||
this.project.elements.add( | ||
ProjectItem.text(`${fileName}.js`, this.generateJSSource(className)), | ||
ProjectItem.text(`${fileName}.html`, this.generateHTMLSource(className)) | ||
); | ||
|
||
return this.project.commitChanges() | ||
.then(() => this.ui.log(`Created ${fileName}.`)); | ||
}); | ||
} | ||
|
||
generateJSSource(className) { | ||
return `import {bindable} from 'aurelia-framework'; | ||
export class ${className} { | ||
@bindable value; | ||
valueChanged(newValue, oldValue) { | ||
} | ||
} | ||
`; | ||
} | ||
|
||
generateHTMLSource(className) { | ||
return `<template> | ||
<h1>\${value}</h1> | ||
</template>`; | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"name": "element", | ||
"description": "Creates a custom element class and template, placing them in the project resources." | ||
} |
Oops, something went wrong.