Skip to content

Commit f7503de

Browse files
authored
Add webpack scenario (#8)
1 parent 7f89a14 commit f7503de

4 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "vscode",
3+
"kind": "tsc",
4+
"args": [
5+
"-p",
6+
"${suiteDirectory}/webpack",
7+
"--outdir",
8+
"${outDirectory}"
9+
],
10+
"platforms": [
11+
"linux"
12+
]
13+
}

cases/scenarios/webpack/setup.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
set -exo pipefail
4+
5+
cd "${0%/*}"
6+
SCENARIO_NAME=$(basename $PWD)
7+
SOLUTION_DIR=../../solutions/$SCENARIO_NAME
8+
9+
if ! test -d $SOLUTION_DIR; then
10+
git clone --filter blob:none https://github.com/webpack/webpack.git $SOLUTION_DIR
11+
fi
12+
13+
cd $SOLUTION_DIR
14+
git clean -fdx
15+
git reset --hard HEAD
16+
git switch --detach 228fc69f40c3e9ec6d99a5105fdc85b5bca4ce43
17+
COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 install --ignore-scripts
18+
19+
# https://github.com/webpack/webpack/blob/228fc69f40c3e9ec6d99a5105fdc85b5bca4ce43/.github/workflows/test.yml#L135
20+
LINK_FOLDER=$PWD/node_modules/.yarn-link
21+
COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 link --link-folder $LINK_FOLDER
22+
COREPACK_ENABLE_STRICT=0 corepack yarn@1.22.21 link --link-folder $LINK_FOLDER webpack

cases/solutions/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/self-compiler/
33
/self-build-src/
44
/mui-docs/
5+
/webpack/

scripts/src/generateMatrix.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const scenarioConfig = {
4444
{ name: "self-compiler", agent: "ts-perf2", location: "public" },
4545
{ name: "self-build-src", agent: "ts-perf3", location: "public" },
4646
{ name: "mui-docs", agent: "ts-perf1", location: "public" },
47+
{ name: "webpack", agent: "ts-perf3", location: "public" },
4748
],
4849
tsserver: [
4950
{ name: "Compiler-UnionsTSServer", agent: "ts-perf1", location: "internal" },

0 commit comments

Comments
 (0)