Add npm .npmrc auth script(bat):
@echo off
if NOT exist .npmrc (
echo Creating custom repo
echo @sfx:registry=https://XXXXX/npm/registry/ > .npmrc
echo always-auth=true >> .npmrc
npx vsts-npm-auth -config .npmrc
)
echo No changes needed
Add npm legacy-peer-deps install(bat):
@RD /S /Q node_modules
del package-lock.json
call npm i --legacy-peer-deps
call npm audit fix --legacy-peer-deps
call npm start
sh bash awk and ripgrep
#!/bin/bash
#Requires awk and ripgrep (rg)
printf "%s\n" "Finding unused strings..."
LINES=`awk '/"/ {print substr($1, 2, length($1)-3)}' en-US.json`
ARRY=()
MAYBEARRY=()
function pause(){
read -p "$*"
}
# for LINE in $LINES;
# do
# if ! `rg -q 't(.*'$LINE'.*)' ../` && ! `rg -q 'i18next/.t(.*'$LINE'.*)' ../`
# then
# if ! `rg -q -w -g '!lang' $LINE ../`
# then
# ARRY+=($LINE)
# else
# MAYBEARRY+=($LINE)
# fi
# fi
# done
if ! `rg -q 't(.*'eventLog'.*)' ../`
then
printf "%s\n" "Dog..."
else
printf "%s\n" "Dog2..."
fi
pause 'Press [Enter] key to continue...'
printf "%s\n\n" "---------------Not Used---------------" > text.txt
printf "%s\n" "${ARRY[@]}" >> text.txt
printf "%s\n\n" "---------------Not Used---------------" >> text.txt
printf "%s\n" "${MAYBEARRY[@]}" >> text.txt
printf "%s\n" "Done! Open text.txt to see the results"