Skip to content

Commit 4608007

Browse files
committed
build: make backwards-compatible build/ directory
1 parent 48b62d8 commit 4608007

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

script/postpublish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ if [[ -f $file ]]; then
1313
cat $file | xargs rm -rfv
1414
rm $file
1515
fi
16+
17+
rm -rf build/

script/prepublish

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ npx action-status --context="$PUBLISH_STATUS_CONTEXT" \
88
# generate the build directory
99
npm run dist
1010

11+
# TODO: remove this in v13
12+
mkdir -p build
13+
cp dist/primer.css build/build.css
14+
cp dist/stats/primer.json build/build.json
15+
echo "module.exports = {cssstats: require('./build.json')}" > build/index.js
16+
1117
files=$(git ls-files src | sed -e 's#^src/##' | sed -e 's#/.*$##' | sort -u)
1218
echo $files > publish-files.log
1319
cd src

0 commit comments

Comments
 (0)