File tree Expand file tree Collapse file tree 2 files changed +1
-31
lines changed Expand file tree Collapse file tree 2 files changed +1
-31
lines changed Original file line number Diff line number Diff line change 4040 run : |
4141 npm pack
4242
43- - name : Check package size and create comment
44- working-directory : ./typescript
45- run : |
46- # Run size-limit to get detailed size analysis
47- SIZE_OUTPUT=$(npm run size 2>&1 || echo "Size check failed")
48-
49- # Get package file info
50- PACKAGE_FILE=$(ls *.tgz | head -1)
51- PACKAGE_SIZE=$(stat -c%s "$PACKAGE_FILE" 2>/dev/null || stat -f%z "$PACKAGE_FILE")
52- PACKAGE_SIZE_KB=$((PACKAGE_SIZE / 1024))
53-
54- # Create comment body
55- cat > /tmp/size_comment.md << EOF
56- ## 📦 Package Size Report
57-
58- **Package:** \`$PACKAGE_FILE\` (${PACKAGE_SIZE_KB} KB compressed)
59-
60- ### Size Limit Analysis:
61- \`\`\`
62- $SIZE_OUTPUT
63- \`\`\`
64-
65- Preview package is ready for testing! 🚀
66- EOF
67-
68- # Post comment to PR
69- gh pr comment --body-file /tmp/size_comment.md
70- env :
71- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72-
7343 - name : List files in typescript dir
7444 working-directory : ./typescript
7545 run : |
Original file line number Diff line number Diff line change 2121 "lint" : " eslint src --ext .ts,.tsx" ,
2222 "lint:fix" : " eslint src --ext .ts,.tsx --fix" ,
2323 "prepare" : " husky" ,
24- "size" : " size-limit"
24+ "size" : " npm run build && size-limit"
2525 },
2626 "keywords" : [
2727 " json" ,
You can’t perform that action at this time.
0 commit comments