-
Notifications
You must be signed in to change notification settings - Fork 2
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 8099aef
Showing
53 changed files
with
14,323 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,27 @@ | ||
module.exports = api => { | ||
api.cache.using(() => { | ||
// cache based on the two env vars | ||
return 'babel:' + process.env.BABEL_TARGET + | ||
' protractor:' + process.env.IN_PROTRACTOR; | ||
}); | ||
|
||
return { | ||
"plugins": [ | ||
['@babel/plugin-proposal-decorators', { legacy: true }], | ||
['@babel/plugin-proposal-class-properties', { loose: true }] | ||
], | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", { | ||
"targets": process.env.BABEL_TARGET === 'node' ? { | ||
"node": process.env.IN_PROTRACTOR ? '6' : 'current' | ||
} : { | ||
"browsers": [ "last 2 versions" ] | ||
}, | ||
"loose": true, | ||
"modules": process.env.BABEL_TARGET === 'node' ? 'commonjs' : 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,12 @@ | ||
# 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,8 @@ | ||
{ | ||
"extends": "./node_modules/aurelia-tools/.eslintrc.json", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"legacyDecorators": 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,17 @@ | ||
.idea | ||
.DS_STORE | ||
.rpt2_cache | ||
TESTS-*.xml | ||
|
||
**/node_modules | ||
**/coverage | ||
**/dist | ||
**/*.tgz | ||
/test/**/coverage | ||
/build | ||
|
||
**/debug.log | ||
**/npm-debug.log | ||
**/lerna-debug.log | ||
|
||
test/cypress/integration/example |
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,10 @@ | ||
{ | ||
"recommendations": [ | ||
"AureliaEffect.aurelia", | ||
"msjsdiag.debugger-for-chrome", | ||
"steoates.autoimport", | ||
"EditorConfig.EditorConfig", | ||
"christian-kohler.path-intellisense", | ||
"behzad88.Aurelia" | ||
] | ||
} |
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,16 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Chrome", | ||
"type": "chrome", | ||
"request": "launch", | ||
"url": "http://localhost:8080", | ||
"webRoot": "${workspaceRoot}/src", | ||
"userDataDir": "${workspaceRoot}/.chrome", | ||
"sourceMapPathOverrides": { | ||
"webpack:///./src/*": "${webRoot}/*" | ||
} | ||
} | ||
] | ||
} |
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,32 @@ | ||
{ | ||
// Use IntelliSense to find out which attributes exist for node debugging | ||
// Use hover for the description of the existing attributes | ||
// For further information visit https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Chrome Debugger", | ||
"type": "chrome", | ||
"request": "launch", | ||
"url": "http://localhost:9000", | ||
"webRoot": "${workspaceRoot}/src", | ||
"userDataDir": "${workspaceRoot}/.chrome", | ||
"sourceMapPathOverrides": { | ||
"../src/*": "${webRoot}/*" | ||
} | ||
}, | ||
{ | ||
"type": "chrome", | ||
"request": "attach", | ||
"name": "Attach Karma Chrome", | ||
"address": "localhost", | ||
"port": 9333, | ||
"sourceMaps": true, | ||
"pathMapping": { | ||
"/": "${workspaceRoot}", | ||
"/base/": "${workspaceRoot}/" | ||
}, | ||
"sourceMapPathOverrides": { "../src/*": "${webRoot}/*" } | ||
} | ||
] | ||
} |
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,21 @@ | ||
# `discord-embed-sender` | ||
|
||
This project is build with [aurelia.js](https://aurelia.io/) and [Skeleton](http://getskeleton.com/) | ||
It's also hosted on [embed.machigatta.com](https://embed.machigatta.com) | ||
|
||
Feels free to work on this small project | ||
|
||
## Requirements | ||
- npm | ||
- aurelia.cli | ||
|
||
## Work-Enviroment | ||
|
||
Run `au run`, then open `http://localhost:8080` | ||
|
||
|
||
## Build | ||
|
||
Run `au build --env prod`. | ||
|
||
> Version 0.8 |
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,29 @@ | ||
{ | ||
"name": "discord-embed-sender", | ||
"type": "project:application", | ||
"paths": { | ||
"root": "src", | ||
"resources": "resources", | ||
"elements": "resources/elements", | ||
"attributes": "resources/attributes", | ||
"valueConverters": "resources/value-converters", | ||
"bindingBehaviors": "resources/binding-behaviors" | ||
}, | ||
"transpiler": { | ||
"id": "babel", | ||
"fileExtension": ".js" | ||
}, | ||
"build": { | ||
"options": { | ||
"server": "dev", | ||
"extractCss": "prod", | ||
"coverage": false | ||
} | ||
}, | ||
"platform": { | ||
"hmr": false, | ||
"open": false, | ||
"port": 8080, | ||
"output": "dist" | ||
} | ||
} |
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; | ||
} | ||
|
||
async execute() { | ||
const name = await this.ui.ensureAnswer( | ||
this.options.args[0], | ||
'What would you like to call the custom attribute?' | ||
); | ||
|
||
let fileName = this.project.makeFileName(name); | ||
let className = this.project.makeClassName(name); | ||
|
||
this.project.attributes.add( | ||
ProjectItem.text(`${fileName}.js`, this.generateSource(className)) | ||
); | ||
|
||
await this.project.commitChanges(); | ||
await 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; | ||
} | ||
|
||
async execute() { | ||
const name = await this.ui.ensureAnswer( | ||
this.options.args[0], | ||
'What would you like to call the binding behavior?' | ||
); | ||
|
||
let fileName = this.project.makeFileName(name); | ||
let className = this.project.makeClassName(name); | ||
|
||
this.project.bindingBehaviors.add( | ||
ProjectItem.text(`${fileName}.js`, this.generateSource(className)) | ||
); | ||
|
||
await this.project.commitChanges(); | ||
await 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,52 @@ | ||
import { inject } from 'aurelia-dependency-injection'; | ||
import { Project, ProjectItem, CLIOptions, UI } from 'aurelia-cli'; | ||
|
||
var path = require('path'); | ||
|
||
@inject(Project, CLIOptions, UI) | ||
export default class ElementGenerator { | ||
constructor(project, options, ui) { | ||
this.project = project; | ||
this.options = options; | ||
this.ui = ui; | ||
} | ||
|
||
async execute() { | ||
const name = await this.ui.ensureAnswer( | ||
this.options.args[0], | ||
'What would you like to call the component?' | ||
); | ||
|
||
const subFolders = await this.ui.ensureAnswer( | ||
this.options.args[1], | ||
'What sub-folder would you like to add it to?\nIf it doesn\'t exist it will be created for you.\n\nDefault folder is the source folder (src).', "." | ||
); | ||
|
||
let fileName = this.project.makeFileName(name); | ||
let className = this.project.makeClassName(name); | ||
|
||
this.project.root.add( | ||
ProjectItem.text(path.join(subFolders, fileName + '.js'), this.generateJSSource(className)), | ||
ProjectItem.text(path.join(subFolders, fileName + '.html'), this.generateHTMLSource(className)) | ||
); | ||
|
||
await this.project.commitChanges(); | ||
await this.ui.log(`Created ${name} in the '${path.join(this.project.root.name, subFolders)}' folder`); | ||
} | ||
|
||
generateJSSource(className) { | ||
return `export class ${className} { | ||
constructor() { | ||
this.message = 'Hello world'; | ||
} | ||
} | ||
` | ||
} | ||
|
||
generateHTMLSource(className) { | ||
return `<template> | ||
<h1>\${message}</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": "component", | ||
"description": "Creates a custom component class and template (view model and view), placing them in the project source folder (or optionally in sub folders)." | ||
} |
Oops, something went wrong.