Skip to content

Commit 5ee9b18

Browse files
authored
Merge pull request #1 from mi-examples/develop
Develop
2 parents dc77648 + 44d88f3 commit 5ee9b18

11 files changed

Lines changed: 365 additions & 376 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
description: Generate PR messages in markdown format for easy copy-paste to GitHub
3+
globs: *.md,*.mdc
4+
---
5+
6+
# PR Message Generation Rules
7+
8+
When generating PR messages, always follow these formatting guidelines for optimal GitHub compatibility:
9+
10+
## Required Format Structure
11+
12+
### 1. Title Format
13+
- Use clear, descriptive titles with emoji prefixes when appropriate
14+
- Follow conventional commit format: `type(scope): description`
15+
- Keep titles under 72 characters
16+
- Use title case for the main description
17+
18+
### 2. Markdown Structure
19+
```markdown
20+
## 🚀 [Title with Emoji]
21+
22+
### 📋 Summary
23+
Brief 2-3 sentence overview of the changes
24+
25+
### ✨ Key Features & Improvements
26+
- **Feature Name** - Description
27+
- **Another Feature** - Description
28+
29+
### 📊 Impact Summary
30+
- **X files changed** with specific improvements
31+
- **Y insertions, Z deletions** - Net impact
32+
- **Performance/UX improvements** - Specific benefits
33+
34+
### 🔄 Breaking Changes
35+
- List any breaking changes or "None - All changes maintain backward compatibility"
36+
37+
### 🧪 Testing & Quality Assurance
38+
- Testing approach and coverage
39+
- Quality assurance measures
40+
41+
### 📝 Included Commits
42+
- `commit-hash commit-message`
43+
- `commit-hash commit-message`
44+
45+
### 🏷️ Release Notes
46+
- High-level benefits and improvements
47+
- What this release enables
48+
49+
### ✅ Ready for [Target]
50+
- Merge status and readiness
51+
- Any additional notes
52+
53+
---
54+
55+
**Merge Request:** `source-branch` → `target-branch`
56+
**Release Tag:** `version-tag` (if applicable)
57+
**Status:** Ready for Review ✅
58+
```
59+
60+
## Emoji Guidelines
61+
- 🚀 for new features
62+
- 🔧 for fixes/improvements
63+
- ⚡ for performance optimizations
64+
- 🔐 for security/auth features
65+
- 🧹 for cleanup/maintenance
66+
- 📊 for metrics/analytics
67+
- 🧪 for testing
68+
- 🔄 for breaking changes
69+
- ✅ for completion/readiness
70+
71+
## Content Requirements
72+
- Always include a clear summary
73+
- List specific technical improvements
74+
- Mention file counts and code changes
75+
- Include commit references
76+
- Specify breaking changes or compatibility
77+
- Use bullet points for readability
78+
- Keep language professional but engaging
79+
80+
## GitHub Compatibility
81+
- Use proper markdown headers (##, ###)
82+
- Include horizontal rules (---) for separation
83+
- Use bold text (**text**) for emphasis
84+
- Use code blocks for technical details
85+
- Ensure proper line breaks for readability
86+
- Use checkboxes (✅) for status indicators

.cursorrules

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# create-pp-dev - Cursor Rules
2+
3+
## Commit Message Guidelines
4+
5+
### Format: `<type>(<scope>): <subject>`
6+
- Use imperative mood ("add" not "added")
7+
- Don't capitalize first letter
8+
- No period at the end
9+
- Keep subject concise (50 chars or less)
10+
11+
### Commit Types (choose one):
12+
- **`feat`** - A new feature (triggers MINOR version bump)
13+
- **`fix`** - A bug fix (triggers PATCH version bump)
14+
- **`docs`** - Documentation only changes (NO version bump)
15+
- **`style`** - Code style changes, formatting, etc (NO version bump)
16+
- **`refactor`** - Code refactoring, no functional changes (NO version bump)
17+
- **`perf`** - Performance improvements (NO version bump)
18+
- **`test`** - Adding or updating tests (NO version bump)
19+
- **`chore`** - Maintenance tasks, dependencies, etc (NO version bump)
20+
- **`ci`** - CI/CD configuration changes (NO version bump)
21+
- **`build`** - Build system or external dependency changes (NO version bump)
22+
23+
### Scopes (optional, but recommended):
24+
- **`templates`** - Template-related changes
25+
- **`react`** - React template changes
26+
- **`nextjs`** - Next.js template changes
27+
- **`vanilla`** - Vanilla template changes
28+
- **`cli`** - CLI-related changes
29+
- **`deps`** - Dependency updates
30+
- **`docs`** - Documentation changes
31+
- **`test`** - Testing changes
32+
- **`config`** - Configuration changes
33+
34+
### Examples:
35+
```bash
36+
feat(templates): add new Vue.js template
37+
fix(cli): resolve project initialization issue
38+
docs(readme): update installation instructions
39+
style: format code according to prettier rules
40+
refactor(cli): extract common validation functions
41+
chore(deps): update all dependencies to latest versions
42+
ci(github): add semantic-release workflow
43+
feat(react): add TypeScript strict mode support
44+
fix(nextjs): resolve build configuration issue
45+
```
46+
47+
### Breaking Changes:
48+
```bash
49+
feat(templates): change default project structure
50+
51+
BREAKING CHANGE: Templates now use different folder structure.
52+
Existing projects may need manual migration.
53+
```
54+
55+
### Body and Footer Guidelines:
56+
- **Body**: Explain WHAT and WHY, not HOW
57+
- **Breaking Changes**: Start footer with "BREAKING CHANGE: <description>"
58+
59+
### Important Notes:
60+
- Only `feat`, `fix`, and `BREAKING CHANGE` trigger version bumps
61+
- Use scopes to indicate which area is affected
62+
- Be descriptive but concise
63+
- Reference related issues when possible
64+
- Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification
65+
66+
## General Development Guidelines
67+
68+
### Code Quality:
69+
- Always aim for clean, maintainable architecture
70+
- Focus on areas of the code relevant to the task
71+
- Do not touch code unrelated to the task
72+
- Avoid making major changes to working patterns unless explicitly instructed
73+
- Think about what other methods and areas might be affected by changes
74+
75+
### Semantic Release:
76+
- This project uses semantic-release for automated versioning
77+
- All releases go through Pull Requests (no direct pushes to main)
78+
- Commit messages determine version bumps automatically
79+
- Follow conventional commit format strictly for proper releases
80+
81+
### Project Structure:
82+
- `src/` - CLI source code
83+
- `template-react/` - React + Vite template
84+
- `template-nextjs/` - Next.js template
85+
- `template-vanilla/` - Vanilla JavaScript template
86+
- `template-vanilla-ts/` - Vanilla TypeScript template
87+
- `mi-cursor-rules/` - Cursor rules for generated projects
88+
- `dist/` - Build output
89+
90+
### Template Guidelines:
91+
- Keep templates minimal but functional
92+
- Include proper TypeScript configurations
93+
- Ensure pp-dev dependency is up to date
94+
- Test templates after changes
95+

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: CI
33
on:
44
pull_request:
55
branches: [main, develop]
6-
push:
7-
branches: [develop]
86

97
jobs:
108
build:
@@ -16,7 +14,7 @@ jobs:
1614
- name: Setup Node.js
1715
uses: actions/setup-node@v4
1816
with:
19-
node-version: 20
17+
node-version: 22
2018
cache: 'npm'
2119

2220
- name: Install dependencies
@@ -35,4 +33,3 @@ jobs:
3533
exit 1
3634
fi
3735
echo "Build verification passed"
38-

.github/workflows/release-beta.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Beta Release
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-beta:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
persist-credentials: false
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm install
30+
31+
- name: Build
32+
run: npm run build
33+
34+
- name: Verify build output
35+
run: |
36+
if [[ ! -d "dist" ]]; then
37+
echo "Build failed: dist directory not found"
38+
exit 1
39+
fi
40+
echo "Build verification passed"
41+
42+
- name: Configure Git
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
run: |
46+
git config user.name "github-actions[bot]"
47+
git config user.email "github-actions[bot]@users.noreply.github.com"
48+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
49+
git fetch --all --tags
50+
51+
- name: Release Beta
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
run: npx semantic-release

.github/workflows/release.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
name: Release
1+
name: Production Release
22

33
on:
44
push:
5-
branches: [main, develop]
5+
tags:
6+
- 'v*'
67

78
permissions:
89
contents: write
9-
issues: write
10-
pull-requests: write
1110

1211
jobs:
1312
release:
@@ -17,15 +16,21 @@ jobs:
1716
uses: actions/checkout@v4
1817
with:
1918
fetch-depth: 0
20-
persist-credentials: false
2119

2220
- name: Setup Node.js
2321
uses: actions/setup-node@v4
2422
with:
25-
node-version: 20
23+
node-version: 22
2624
registry-url: https://registry.npmjs.org/
2725
cache: 'npm'
2826

27+
- name: Extract version from tag
28+
id: version
29+
run: |
30+
VERSION=${GITHUB_REF_NAME#v}
31+
echo "version=$VERSION" >> $GITHUB_OUTPUT
32+
echo "Releasing version: $VERSION"
33+
2934
- name: Install dependencies
3035
run: npm install
3136

@@ -40,10 +45,19 @@ jobs:
4045
fi
4146
echo "Build verification passed"
4247
43-
- name: Release
48+
- name: Update package version
49+
run: npm version ${{ steps.version.outputs.version }} --no-git-tag-version
50+
51+
- name: Publish to npm
4452
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4753
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48-
run: npx semantic-release
54+
run: npm publish --access public
4955

56+
- name: Create GitHub Release
57+
uses: softprops/action-gh-release@v1
58+
with:
59+
tag_name: ${{ github.ref_name }}
60+
name: Release ${{ github.ref_name }}
61+
generate_release_notes: true
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/update-pp-dev.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
schedule:
66
- cron: '0 */6 * * *' # Every 6 hours
77

8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
812
jobs:
913
update:
1014
runs-on: ubuntu-latest
@@ -15,7 +19,7 @@ jobs:
1519
- name: Setup Node.js
1620
uses: actions/setup-node@v4
1721
with:
18-
node-version: 20
22+
node-version: 22
1923

2024
- name: Check for pp-dev updates
2125
id: check
@@ -57,4 +61,3 @@ jobs:
5761
- New: ${{ steps.check.outputs.latest }}
5862
branch: deps/update-pp-dev
5963
delete-branch: true
60-

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# IDE
2+
.idea
3+
.vscode
4+
5+
# Build outputs
6+
dist
7+
8+
# Dependencies
9+
node_modules
10+
11+
# Template package locks (generated on install)
12+
template-*/package-lock.json
13+
14+
# Pack files
15+
*-create-pp-dev-*.*.*.tgz
16+
17+
# Environment
18+
.env
19+
!.env.example
20+
21+
# Logs
22+
*.log
23+
npm-debug.log*
24+
25+
# OS files
26+
.DS_Store
27+
Thumbs.db
28+

0 commit comments

Comments
 (0)