mirror of
https://github.com/primer/css.git
synced 2024-11-23 11:27:26 +03:00
chore: update script/selector-diff-report for reorg
This commit is contained in:
parent
3b65d3a4b3
commit
199a4e4d50
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
module=${1:-primer}
|
module=${1:-@primer/css}
|
||||||
version=${2:-latest}
|
version=${2:-latest}
|
||||||
|
|
||||||
function log() {
|
function log() {
|
||||||
@ -12,13 +12,11 @@ log "Pulling the latest ${module}/build/data.json ..."
|
|||||||
curl -sL "https://unpkg.com/${module}@${version}/build/data.json" > before.json
|
curl -sL "https://unpkg.com/${module}@${version}/build/data.json" > before.json
|
||||||
|
|
||||||
log "Building ${module}/build/data.json locally..."
|
log "Building ${module}/build/data.json locally..."
|
||||||
pushd modules/${module} > /dev/null
|
|
||||||
npm run build
|
npm run build
|
||||||
popd > /dev/null
|
cp build/data.json after.json
|
||||||
cp modules/${module}/build/data.json after.json
|
|
||||||
|
|
||||||
function list_selectors() {
|
function list_selectors() {
|
||||||
jq -r .cssstats.selectors.values[] $1 | sort
|
jq -r '.cssstats.selectors.values[]' $1 | sort
|
||||||
}
|
}
|
||||||
|
|
||||||
list_selectors before.json > before.txt
|
list_selectors before.json > before.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user