-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-github.sh
More file actions
63 lines (57 loc) · 2.03 KB
/
setup-github.sh
File metadata and controls
63 lines (57 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
# =============================================================================
# setup-github.sh — Initialise git repo and push to GitHub
#
# Prerequisites:
# git + GitHub CLI (https://cli.github.com/)
# Run: gh auth login (once, before this script)
#
# Usage:
# chmod +x setup-github.sh
# ./setup-github.sh
# =============================================================================
set -euo pipefail
REPO_NAME="wealthywidgets"
DESCRIPTION="A collection of ready-to-use React UI widgets for rapid prototyping"
VISIBILITY="public" # public | private
echo "==> Initialising git repository…"
git init
git add .
git commit -m "feat: initial commit — WealthyWidgets v1.0.0
7 self-contained React UI components:
- Button (variants, sizes, loading, icons)
- Card (image, title, description, actions)
- Input (icon, hint, validation)
- Modal (Portal, Escape, scroll-lock)
- Dropdown (search, multi-select, tags)
- ProgressBar (status colours, label positions, striped)
- Tooltip (4 placements, 3 variants, delays)
TypeScript strict · SCSS BEM · 59 Jest tests · GitHub Actions CI"
echo ""
echo "==> Creating GitHub repository via GitHub CLI…"
if command -v gh &>/dev/null; then
gh repo create "$REPO_NAME" \
--description "$DESCRIPTION" \
--"$VISIBILITY" \
--source=. \
--remote=origin \
--push
echo ""
echo "✅ Repository created and pushed!"
GITHUB_USER=$(gh api user -q .login)
echo " https://github.com/$GITHUB_USER/$REPO_NAME"
else
echo "⚠️ GitHub CLI (gh) not found."
echo ""
echo "Manual steps:"
echo " 1. Create repo at https://github.com/new (name: $REPO_NAME)"
echo " 2. Then run:"
echo " git remote add origin https://github.com/YOUR_USERNAME/$REPO_NAME.git"
echo " git branch -M main"
echo " git push -u origin main"
fi
echo ""
echo "==> Next steps:"
echo " 1. Replace YOUR_USERNAME in README.md and package.json"
echo " 2. npm install → npm test → npm run build"
echo " 3. To publish to npm manually: see README.md → Publishing"