diff --git a/benchmark/.gitignore b/benchmark/.gitignore index 91dab91..2ed58a8 100644 --- a/benchmark/.gitignore +++ b/benchmark/.gitignore @@ -1,3 +1,4 @@ react-hook-form/ taxonomy/ excalidraw/ +vue_core/ diff --git a/benchmark/vue_core.sh b/benchmark/vue_core.sh new file mode 100755 index 0000000..234dfe7 --- /dev/null +++ b/benchmark/vue_core.sh @@ -0,0 +1,25 @@ +if [ ! -d "vue_core" ]; then + git clone --depth=1 -b v3.5.13 git@github.com:vuejs/core.git vue_core + cd vue_core + cat > knip.json << EOF +{ + "$schema": "https://unpkg.com/knip@5/schema.json", + "entry": [ + "**/src/index.ts", + "**/src/cli.ts", + "**/src/runtime.ts", + "**/src/esm-runtime.ts" + ], + "project": ["packages/src/**/*.ts", "packages/global.d.ts"], + "include": ["files", "exports", "types", "nsExports", "nsTypes"] +} +EOF + ## we remove the packages-private folder because there's an import that knip can't resolve and it's not necessary for the benchmark + rm -rf packages-private + pnpm i -w knip@5.39.2 +else + cd vue_core +fi + +npx tsr --version +hyperfine --warmup 3 --runs 5 -i "npx tsr -p tsconfig.build.json '.+/src/.*(index|runtime|cli)\.ts$'" "npx knip"