1
1
mirror of https://github.com/primer/css.git synced 2024-12-21 13:11:49 +03:00
css/script/prepublish

21 lines
478 B
Plaintext
Raw Normal View History

#!/bin/bash
2019-02-13 00:36:51 +03:00
set -e
# generate the build directory
npm run --silent dist
# run the bundle size and selector diff reports
script/run-reports
# TODO: remove this in v13
mkdir -p build
cp dist/primer.css build/build.css
cp dist/stats/primer.json build/build.json
echo "module.exports = {cssstats: require('./build.json')}" > build/index.js
files=$(git ls-files src | sed -e 's#^src/##' | sed -e 's#/.*$##' | sort -u)
echo $files > publish-files.log
cd src
cp -rv $files ..
cd -