mirror of
https://github.com/primer/css.git
synced 2024-09-11 16:36:07 +03:00
updating the diff report to output diff
This commit is contained in:
parent
7b5843f27f
commit
600fa4fd0b
@ -11,16 +11,14 @@ function warn() {
|
||||
|
||||
pkg="@primer/css"
|
||||
path="dist/stats/primer.json"
|
||||
warn "Pulling the old $path from unpkg.com..."
|
||||
curl -sL "https://unpkg.com/$pkg/$path" > before.json
|
||||
cp "tmp/node_modules/@primer/css/dist/stats/primer.json" before.json
|
||||
|
||||
warn "Building the stats locally..."
|
||||
cp $path after.json
|
||||
|
||||
key=".selectors.values[]"
|
||||
jq -r $key before.json > before.txt
|
||||
jq -r $key after.json > after.txt
|
||||
|
||||
diff {before,after}.txt && echo 'no diff!'
|
||||
diff -u {before,after}.txt
|
||||
|
||||
rm {before,after}.{json,txt}
|
||||
|
Loading…
Reference in New Issue
Block a user