-
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
1 parent
14fae2e
commit def8450
Showing
99 changed files
with
86,015 additions
and
1 deletion.
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,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 |
---|---|---|
|
@@ -249,4 +249,4 @@ paket-files/ | |
|
||
# JetBrains Rider | ||
.idea/ | ||
*.sln.iml | ||
*.sln.iml |
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,6 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"html.suggest.angular1": false, | ||
"html.suggest.ionic": 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,162 @@ | ||
{ | ||
"name": "web-main", | ||
"type": "project:application", | ||
"platform": { | ||
"id": "web", | ||
"displayName": "Web", | ||
"output": "scripts", | ||
"index": "index.html" | ||
}, | ||
"transpiler": { | ||
"id": "typescript", | ||
"displayName": "TypeScript", | ||
"fileExtension": ".ts", | ||
"dtsSource": [ | ||
"./typings/**/*.d.ts", | ||
"./custom_typings/**/*.d.ts" | ||
], | ||
"source": "src/**/*.ts" | ||
}, | ||
"markupProcessor": { | ||
"id": "none", | ||
"displayName": "None", | ||
"fileExtension": ".html", | ||
"source": "src/**/*.html" | ||
}, | ||
"cssProcessor": { | ||
"id": "postcss", | ||
"displayName": "Post CSS", | ||
"fileExtension": ".css", | ||
"source": "src/**/*.css" | ||
}, | ||
"editor": { | ||
"id": "vscode", | ||
"displayName": "Visual Studio Code" | ||
}, | ||
"unitTestRunner": { | ||
"id": "karma", | ||
"displayName": "Karma", | ||
"source": "test/unit/**/*.ts" | ||
}, | ||
"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", | ||
"node_modules/whatwg-fetch/fetch.js", | ||
"node_modules/requirejs/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", | ||
"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" | ||
}, | ||
{ | ||
"name": "aurelia-fetch-client", | ||
"path": "../node_modules/aurelia-fetch-client/dist/amd", | ||
"main": "aurelia-fetch-client" | ||
}, | ||
"jquery", | ||
{ | ||
"name": "bootstrap", | ||
"path": "../node_modules/bootstrap/dist", | ||
"main": "js/bootstrap.min", | ||
"deps": [ | ||
"jquery" | ||
], | ||
"exports": "$", | ||
"resources": [ | ||
"css/bootstrap.css" | ||
] | ||
}, | ||
{ | ||
"name": "datatables", | ||
"path": "../node_modules/datatables", | ||
"main": "media/js/jquery.dataTables" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
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,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,38 @@ | ||
import {inject} from 'aurelia-dependency-injection'; | ||
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; | ||
|
||
@inject(Project, CLIOptions, UI) | ||
export default class AttributeGenerator { | ||
constructor(private project: Project, private options: CLIOptions, private 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}.ts`, this.generateSource(className)) | ||
); | ||
|
||
return this.project.commitChanges() | ||
.then(() => this.ui.log(`Created ${fileName}.`)); | ||
}); | ||
} | ||
|
||
generateSource(className) { | ||
return `import {autoinject} from 'aurelia-framework'; | ||
@autoinject() | ||
export class ${className}CustomAttribute { | ||
constructor(private 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": "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,37 @@ | ||
import {inject} from 'aurelia-dependency-injection'; | ||
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; | ||
|
||
@inject(Project, CLIOptions, UI) | ||
export default class BindingBehaviorGenerator { | ||
constructor(private project: Project, private options: CLIOptions, private 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}.ts`, 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": "element", | ||
"description": "Creates a custom element class and template, placing them 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,44 @@ | ||
import {inject} from 'aurelia-dependency-injection'; | ||
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; | ||
|
||
@inject(Project, CLIOptions, UI) | ||
export default class ElementGenerator { | ||
constructor(private project: Project, private options: CLIOptions, private 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}.ts`, 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": "generator", | ||
"description": "Creates a generator class and places it in the project generators folder." | ||
} |
Oops, something went wrong.