Skip to content

Commit 2cedcc5

Browse files
authored
Add vscode CSS properties to the script get-vscode-usages.sh (RooCodeInc#3752)
The script will report which vscode CSS vars are being used in the webview, as well the uses of the vscode SDK.
1 parent 14a0c60 commit 2cedcc5

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

scripts/get-vscode-usages.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,25 @@ set -eu
33

44
DIR=${1:-src/}
55
DEST_DIR=dist-standalone
6-
DEST=dist-standalone/vscode-uses.txt
6+
SDK_DEST=$DEST_DIR/vscode-sdk-uses.txt
7+
CSS_DEST=$DEST_DIR/vscode-css-uses.txt
78
mkdir -p $DEST_DIR
89

910
{
1011
git grep -h 'vscode\.' $DIR |
1112
grep -Ev '//.*vscode' | # remove commented out code
1213
sed 's|.*vscode\.|vscode.|'| # remove everything before vscode.
1314
sed 's/[^a-zA-Z0-9_.].*$//' | # remove everything after last identifier
14-
sort | uniq > $DEST
15+
sort | uniq > $SDK_DEST
1516
}
17+
echo Wrote uses of the vscode SDK to $(realpath $SDK_DEST)
1618

17-
echo Done, wrote uses of the vscode SDK to $(realpath $DEST)
19+
{
20+
grep -rh -- --vscode- webview-ui/build/ |
21+
sed 's/--vscode/\n--vscode/g' | # One var per line
22+
grep -- --vscode | # Remove lines that don't have vars.
23+
sed 's/[),"\\].*$//' | # remove from the end of the var name to the end of the line.
24+
sort | uniq > $CSS_DEST
25+
}
26+
echo Wrote vscode vars used to $(realpath $CSS_DEST)
1827

0 commit comments

Comments
 (0)