Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for multiple services in the same monorepo #263

Open
sagi053 opened this issue Jan 25, 2023 · 0 comments
Open

for multiple services in the same monorepo #263

sagi053 opened this issue Jan 25, 2023 · 0 comments

Comments

@sagi053
Copy link

sagi053 commented Jan 25, 2023

mkdir -p "./license-checker"
root=$PWD

find . -name package.json -not -path "*node_modules*" -not -path "*components*" > ./license-checker/license-checker.txt

grep -v '^ *#' < ./license-checker/license-checker.txt | while IFS= read -r line
do
  fullPath=${line#*./}
  dirPath=${fullPath%package.json*}
  service=$(basename "$dirPath")
  if [ -z "$service" ]; then
    service="main"
  fi
  echo "$service"
  cd "$root"/"$dirPath" && license-checker --csv --out "$root"/license-checker/"$service".csv
done

rm "$root"/license-checker/license-checker.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant