Skip to content

Commit 5e9aef9

Browse files
committed
Merge branch 'Vheissu-feat/update-aurelia-1'
2 parents 4ad2bf7 + 82b18af commit 5e9aef9

40 files changed

+9949
-13270
lines changed

frameworks/non-keyed/aurelia/.babelrc

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
scripts
21
src/environment.js

frameworks/non-keyed/aurelia/.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
legacy-peer-deps=true
1+
# for pnpm, use flat node_modules
2+
shamefully-hoist=true
Lines changed: 19 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,30 @@
11
{
2-
"name": "aurelia-v1.1.2-non-keyed",
2+
"name": "js-benchmark",
33
"type": "project:application",
4-
"bundler": {
5-
"id": "cli",
6-
"displayName": "Aurelia-CLI"
7-
},
8-
"build": {
9-
"targets": [
10-
{
11-
"id": "web",
12-
"displayName": "Web",
13-
"index": "index.html",
14-
"baseDir": ".",
15-
"output": "scripts"
16-
}
17-
],
18-
"options": {
19-
"minify": "stage & prod",
20-
"sourcemaps": "dev & stage"
21-
},
22-
"bundles": [
23-
{
24-
"name": "app-bundle.js",
25-
"source": [
26-
"[**/*.js]",
27-
"**/*.{css,html}"
28-
]
29-
},
30-
{
31-
"name": "vendor-bundle.js",
32-
"prepend": [
33-
"node_modules/requirejs/require.js"
34-
],
35-
"dependencies": [
36-
"aurelia-binding",
37-
"aurelia-bootstrapper",
38-
"aurelia-dependency-injection",
39-
"aurelia-framework",
40-
"aurelia-loader",
41-
"aurelia-loader-default",
42-
"aurelia-logging",
43-
{
44-
"name": "aurelia-logging-console",
45-
"path": "../node_modules/aurelia-logging-console/dist/amd",
46-
"main": "aurelia-logging-console",
47-
"env": "dev & stage"
48-
},
49-
"aurelia-metadata",
50-
"aurelia-pal",
51-
"aurelia-pal-browser",
52-
"aurelia-path",
53-
"aurelia-task-queue",
54-
"aurelia-templating",
55-
"aurelia-templating-binding",
56-
{
57-
"name": "aurelia-templating-resources",
58-
"path": "../node_modules/aurelia-templating-resources/dist/amd",
59-
"main": "aurelia-templating-resources"
60-
},
61-
"text"
62-
]
63-
}
64-
],
65-
"loader": {
66-
"type": "require",
67-
"configTarget": "vendor-bundle.js",
68-
"includeBundleMetadataInConfig": "auto",
69-
"plugins": [
70-
{
71-
"name": "text",
72-
"extensions": [
73-
".html",
74-
".css"
75-
],
76-
"stub": true
77-
}
78-
]
79-
}
80-
},
81-
"platform": {
82-
"id": "web",
83-
"displayName": "Web",
84-
"index": "index.html",
85-
"baseDir": ".",
86-
"output": "scripts"
87-
},
88-
"transpiler": {
89-
"id": "babel",
90-
"displayName": "Babel",
91-
"fileExtension": ".js",
92-
"options": {
93-
"plugins": [
94-
"transform-es2015-modules-amd"
95-
]
96-
},
97-
"source": "src/**/*.js"
98-
},
99-
"markupProcessor": {
100-
"id": "minimum",
101-
"displayName": "Minimal Minification",
102-
"fileExtension": ".html",
103-
"source": "src/**/*.html"
104-
},
105-
"cssProcessor": {
106-
"id": "none",
107-
"displayName": "None",
108-
"fileExtension": ".css",
109-
"source": "src/**/*.css"
110-
},
111-
"editor": {
112-
"id": "none",
113-
"displayName": "None"
114-
},
115-
"unitTestRunner": {
116-
"id": "none",
117-
"displayName": "None"
118-
},
1194
"paths": {
1205
"root": "src",
1216
"resources": "resources",
1227
"elements": "resources/elements",
1238
"attributes": "resources/attributes",
1249
"valueConverters": "resources/value-converters",
12510
"bindingBehaviors": "resources/binding-behaviors"
11+
},
12+
"transpiler": {
13+
"id": "babel",
14+
"fileExtension": ".js"
15+
},
16+
"build": {
17+
"options": {
18+
"server": "dev",
19+
"extractCss": "prod",
20+
"coverage": false
21+
}
22+
},
23+
"platform": {
24+
"hmr": false,
25+
"open": false,
26+
"port": 8080,
27+
"host": "localhost",
28+
"output": "dist"
12629
}
12730
}

frameworks/non-keyed/aurelia/aurelia_project/environments/dev.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

frameworks/non-keyed/aurelia/aurelia_project/environments/prod.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

frameworks/non-keyed/aurelia/aurelia_project/environments/stage.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

frameworks/non-keyed/aurelia/aurelia_project/generators/attribute.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@ export default class AttributeGenerator {
99
this.ui = ui;
1010
}
1111

12-
execute() {
13-
return this.ui
14-
.ensureAnswer(this.options.args[0], 'What would you like to call the custom attribute?')
15-
.then(name => {
16-
let fileName = this.project.makeFileName(name);
17-
let className = this.project.makeClassName(name);
18-
19-
this.project.attributes.add(
20-
ProjectItem.text(`${fileName}.js`, this.generateSource(className))
21-
);
22-
23-
return this.project.commitChanges()
24-
.then(() => this.ui.log(`Created ${fileName}.`));
25-
});
12+
async execute() {
13+
const name = await this.ui.ensureAnswer(
14+
this.options.args[0],
15+
'What would you like to call the custom attribute?'
16+
);
17+
18+
let fileName = this.project.makeFileName(name);
19+
let className = this.project.makeClassName(name);
20+
21+
this.project.attributes.add(
22+
ProjectItem.text(`${fileName}.js`, this.generateSource(className))
23+
);
24+
25+
await this.project.commitChanges();
26+
await this.ui.log(`Created ${fileName}.`);
2627
}
2728

2829
generateSource(className) {
@@ -35,10 +36,9 @@ export class ${className}CustomAttribute {
3536
}
3637
3738
valueChanged(newValue, oldValue) {
38-
39+
//
3940
}
4041
}
41-
4242
`;
4343
}
4444
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "attribute",
33
"description": "Creates a custom attribute class and places it in the project resources."
4-
}
4+
}

frameworks/non-keyed/aurelia/aurelia_project/generators/binding-behavior.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,33 @@ export default class BindingBehaviorGenerator {
99
this.ui = ui;
1010
}
1111

12-
execute() {
13-
return this.ui
14-
.ensureAnswer(this.options.args[0], 'What would you like to call the binding behavior?')
15-
.then(name => {
16-
let fileName = this.project.makeFileName(name);
17-
let className = this.project.makeClassName(name);
12+
async execute() {
13+
const name = await this.ui.ensureAnswer(
14+
this.options.args[0],
15+
'What would you like to call the binding behavior?'
16+
);
1817

19-
this.project.bindingBehaviors.add(
20-
ProjectItem.text(`${fileName}.js`, this.generateSource(className))
21-
);
18+
let fileName = this.project.makeFileName(name);
19+
let className = this.project.makeClassName(name);
2220

23-
return this.project.commitChanges()
24-
.then(() => this.ui.log(`Created ${fileName}.`));
25-
});
21+
this.project.bindingBehaviors.add(
22+
ProjectItem.text(`${fileName}.js`, this.generateSource(className))
23+
);
24+
25+
await this.project.commitChanges();
26+
await this.ui.log(`Created ${fileName}.`);
2627
}
2728

2829
generateSource(className) {
2930
return `export class ${className}BindingBehavior {
3031
bind(binding, source) {
31-
32+
//
3233
}
3334
3435
unbind(binding, source) {
35-
36+
//
3637
}
3738
}
38-
3939
`
4040
}
4141
}

0 commit comments

Comments
 (0)