Show Ruby/Gem version in repository on GitHub organization - DEV Community π©βπ»π¨βπ»
yarn
$ for dir in */; do (cd $dir; git grep -n -A1 -E '^jquery@' yarn.lock 2>/dev/null|perl -ne 'print if s/ version "(.*?)"/$1/'| tr -s '\n' '\0' | xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
npm
$ for dir in */; do (cd $dir; git grep -n -A1 -E '"jquery"' package-lock.json 2>/dev/null|perl -ne 'print if s/"version": "(.*?)"/$1/'| tr -s '\n' '\0' | xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
Top comments (1)
To display your npm package version on a GitHub repository, you can use an npm version badge. It automatically shows the latest published version of your package and updates whenever a new release is published. This helps visitors quickly see which version is currently live, keeping your repository transparent and up to date