Skip to content

Commit 16e7927

Browse files
checkpoint
1 parent b2a8f5c commit 16e7927

File tree

2 files changed

+1
-31
lines changed

2 files changed

+1
-31
lines changed

.github/workflows/preview.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -40,36 +40,6 @@ jobs:
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: |

typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
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",

0 commit comments

Comments
 (0)