Skip to content

Instantly share code, notes, and snippets.

@jbinto
Created February 7, 2017 00:32
Show Gist options
  • Save jbinto/0672c5cc3dfd0ac023b561f294b93cd0 to your computer and use it in GitHub Desktop.
Save jbinto/0672c5cc3dfd0ac023b561f294b93cd0 to your computer and use it in GitHub Desktop.
Extract info from npm packages
cat /tmp/packages.txt | while read PACKAGE
do
yarn info $PACKAGE --json |
head -n1 |
jq --raw-output '"\"\(.data.name)\", \"\(.data.version)\", \"\(.data.homepage)\", \"\(.data.license)\", \"\(.data.description)\""' |
tee -a /tmp/output3.txt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment