Skip to content

Commit

Permalink
Merge branch 'master' of github.com:krausest/js-framework-benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
krausest committed Jul 19, 2023
2 parents 7e4e563 + ba3b135 commit ad49a81
Show file tree
Hide file tree
Showing 49 changed files with 4,270 additions and 12,970 deletions.
63 changes: 35 additions & 28 deletions cleanup.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
var _ = require('lodash');
var exec = require('child_process').execSync;
var fs = require('fs');
var commandExists = require('command-exists');
const path = require('path');
const rimraf = require('rimraf');
const fs = require("fs");
const path = require("path");

function rmIfExists(base, name) {
let dir = path.join(base, name);
if(fs.existsSync(dir)) {
console.log("Clean ",dir);
rimraf.sync(dir);
}
/**
* @param {string} dir
*/
function rmIfExists(dir) {
if (fs.existsSync(dir)) {
console.log("Cleaning", dir);
fs.rmSync(dir, { recursive: true });
}
}

for (let keyedType of ['keyed', 'non-keyed']) {
let dir = path.resolve('frameworks', keyedType);
let directories = fs.readdirSync(dir);
/**
* @param {string} basePath
* @param {string} keyedTypes
*/
function cleanFrameworkDirectories(basePath, keyedTypes) {
for (const keyedType of keyedTypes) {
const frameworkDir = path.resolve(basePath, keyedType);
const directories = fs.readdirSync(frameworkDir);

for (let name of directories) {
let fd = path.resolve(dir, name);
console.log('cleaning ', fd);
if(fs.existsSync(fd+"/node_modules")) {
rimraf.sync(fd+"/node_modules");
}
rmIfExists(fd, "package-lock.json");
rmIfExists(fd, "yarn.lock");
rmIfExists(fd, "dist");
rmIfExists(fd, "elm-stuff");
rmIfExists(fd, "bower_components");
rmIfExists(fd, "node_modules");
}
for (const directory of directories) {
const frameworkPath = path.resolve(frameworkDir, directory);
console.log("cleaning ", frameworkPath);

rmIfExists(path.join(frameworkPath, "package-lock.json"));
rmIfExists(path.join(frameworkPath, "yarn.lock"));
rmIfExists(path.join(frameworkPath, "node_modules"));
rmIfExists(path.join(frameworkPath, "dist"));
rmIfExists(path.join(frameworkPath, "elm-stuff"));
rmIfExists(path.join(frameworkPath, "bower_components"));
}
}
}

const keyedTypes = ["keyed", "non-keyed"];
const frameworksPath = path.resolve("frameworks");

cleanFrameworkDirectories(frameworksPath, keyedTypes);
93 changes: 52 additions & 41 deletions frameworks/keyed/apprun/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions frameworks/keyed/apprun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
"js-framework-benchmark": {
"frameworkVersionFromPackage": "apprun",
"frameworkHomeURL": "https://apprun.js.org/",
"issues": [801]
"issues": [
801
]
},
"scripts": {
"build-dev": "esbuild src/main.tsx --bundle --outfile=dist/main.js --serve=8080 --servedir=.",
"build-prod": "esbuild src/main.tsx --bundle --outfile=dist/main.js --minify"
},
"keywords": [
"apprun",
"js benmarks"
"js benchmarks"
],
"author": "Yiyi Sun <[email protected]",
"license": "Apache-2.0",
Expand All @@ -24,9 +26,9 @@
"url": "https://github.com/yysun/js-framework-benchmark.git"
},
"devDependencies": {
"esbuild": "^0.8.54"
"esbuild": "^0.18.13"
},
"dependencies": {
"apprun": "^2.27.7"
"apprun": "^3.30.2"
}
}
20 changes: 0 additions & 20 deletions frameworks/keyed/apprun/webpack.config.js

This file was deleted.

Loading

0 comments on commit ad49a81

Please sign in to comment.