Last active
November 28, 2018 14:10
-
-
Save gastaldi/5954a9d65bfff0fe83b9ced555862482 to your computer and use it in GitHub Desktop.
Convert all dependencies to exact version in package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires jq and yarn | |
for row in $(cat package.json | jq '.dependencies'| jq 'keys[]' -r); do | |
yarn add ${row} -W --exact | |
done | |
for row in $(cat package.json | jq '.devDependencies'| jq 'keys[]' -r); do | |
yarn add ${row} -W --exact -D | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment