Skip to content

Commit ad49a81

Browse files
committed
Merge branch 'master' of github.com:krausest/js-framework-benchmark
2 parents 7e4e563 + ba3b135 commit ad49a81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4270
-12970
lines changed

cleanup.js

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
1-
var _ = require('lodash');
2-
var exec = require('child_process').execSync;
3-
var fs = require('fs');
4-
var commandExists = require('command-exists');
5-
const path = require('path');
6-
const rimraf = require('rimraf');
1+
const fs = require("fs");
2+
const path = require("path");
73

8-
function rmIfExists(base, name) {
9-
let dir = path.join(base, name);
10-
if(fs.existsSync(dir)) {
11-
console.log("Clean ",dir);
12-
rimraf.sync(dir);
13-
}
4+
/**
5+
* @param {string} dir
6+
*/
7+
function rmIfExists(dir) {
8+
if (fs.existsSync(dir)) {
9+
console.log("Cleaning", dir);
10+
fs.rmSync(dir, { recursive: true });
11+
}
1412
}
1513

16-
for (let keyedType of ['keyed', 'non-keyed']) {
17-
let dir = path.resolve('frameworks', keyedType);
18-
let directories = fs.readdirSync(dir);
14+
/**
15+
* @param {string} basePath
16+
* @param {string} keyedTypes
17+
*/
18+
function cleanFrameworkDirectories(basePath, keyedTypes) {
19+
for (const keyedType of keyedTypes) {
20+
const frameworkDir = path.resolve(basePath, keyedType);
21+
const directories = fs.readdirSync(frameworkDir);
1922

20-
for (let name of directories) {
21-
let fd = path.resolve(dir, name);
22-
console.log('cleaning ', fd);
23-
if(fs.existsSync(fd+"/node_modules")) {
24-
rimraf.sync(fd+"/node_modules");
25-
}
26-
rmIfExists(fd, "package-lock.json");
27-
rmIfExists(fd, "yarn.lock");
28-
rmIfExists(fd, "dist");
29-
rmIfExists(fd, "elm-stuff");
30-
rmIfExists(fd, "bower_components");
31-
rmIfExists(fd, "node_modules");
32-
}
23+
for (const directory of directories) {
24+
const frameworkPath = path.resolve(frameworkDir, directory);
25+
console.log("cleaning ", frameworkPath);
26+
27+
rmIfExists(path.join(frameworkPath, "package-lock.json"));
28+
rmIfExists(path.join(frameworkPath, "yarn.lock"));
29+
rmIfExists(path.join(frameworkPath, "node_modules"));
30+
rmIfExists(path.join(frameworkPath, "dist"));
31+
rmIfExists(path.join(frameworkPath, "elm-stuff"));
32+
rmIfExists(path.join(frameworkPath, "bower_components"));
33+
}
34+
}
3335
}
36+
37+
const keyedTypes = ["keyed", "non-keyed"];
38+
const frameworksPath = path.resolve("frameworks");
39+
40+
cleanFrameworkDirectories(frameworksPath, keyedTypes);

frameworks/keyed/apprun/package-lock.json

Lines changed: 52 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/apprun/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66
"js-framework-benchmark": {
77
"frameworkVersionFromPackage": "apprun",
88
"frameworkHomeURL": "https://apprun.js.org/",
9-
"issues": [801]
9+
"issues": [
10+
801
11+
]
1012
},
1113
"scripts": {
1214
"build-dev": "esbuild src/main.tsx --bundle --outfile=dist/main.js --serve=8080 --servedir=.",
1315
"build-prod": "esbuild src/main.tsx --bundle --outfile=dist/main.js --minify"
1416
},
1517
"keywords": [
1618
"apprun",
17-
"js benmarks"
19+
"js benchmarks"
1820
],
1921
"author": "Yiyi Sun <[email protected]",
2022
"license": "Apache-2.0",
@@ -24,9 +26,9 @@
2426
"url": "https://github.com/yysun/js-framework-benchmark.git"
2527
},
2628
"devDependencies": {
27-
"esbuild": "^0.8.54"
29+
"esbuild": "^0.18.13"
2830
},
2931
"dependencies": {
30-
"apprun": "^2.27.7"
32+
"apprun": "^3.30.2"
3133
}
3234
}

frameworks/keyed/apprun/webpack.config.js

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

0 commit comments

Comments
 (0)