1
1
mirror of https://github.com/primer/css.git synced 2024-12-24 22:53:58 +03:00
css/script/selector-diff-report

25 lines
416 B
Plaintext
Raw Normal View History

2019-01-24 02:31:51 +03:00
#!/bin/bash
set -e
function log() {
2019-04-26 23:11:08 +03:00
echo "$@" 1>&2
2019-01-24 02:31:51 +03:00
}
function warn() {
2019-04-26 23:11:08 +03:00
echo "$@" 1>&2
}
pkg="@primer/css"
path="dist/stats/primer.json"
2021-04-09 07:18:03 +03:00
cp "tmp/node_modules/@primer/css/dist/stats/primer.json" before.json
2019-01-24 02:31:51 +03:00
cp $path after.json
2019-01-24 02:31:51 +03:00
key=".selectors.values[]"
2021-05-05 22:38:18 +03:00
jq -r $key before.json | sort | uniq > before.txt
jq -r $key after.json | sort | uniq > after.txt
2019-01-24 02:31:51 +03:00
2021-04-09 07:18:03 +03:00
diff -u {before,after}.txt
2019-01-24 02:31:51 +03:00
rm {before,after}.{json,txt}