@raftlabs/raftstack 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -12
- package/dist/cli.js +345 -115
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,54 @@ The wizard will:
|
|
|
40
40
|
4. Set up CODEOWNERS for automatic PR reviewers
|
|
41
41
|
5. Generate all configuration files
|
|
42
42
|
|
|
43
|
+
## Getting Started
|
|
44
|
+
|
|
45
|
+
After installing RaftStack in your project, follow these steps:
|
|
46
|
+
|
|
47
|
+
### 1. Initialize RaftStack
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Run the interactive setup wizard
|
|
51
|
+
pnpm dlx @raftlabs/raftstack init
|
|
52
|
+
# or
|
|
53
|
+
npx @raftlabs/raftstack init
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 2. Initialize Claude Code (Optional)
|
|
57
|
+
|
|
58
|
+
If you use [Claude Code](https://claude.ai/code), initialize it to enable the bundled AI development skills:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
claude /init
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
This creates a `CLAUDE.md` file and enables the [Claude Code Skills](#claude-code-skills) that were copied to `.claude/skills/`.
|
|
65
|
+
|
|
66
|
+
### 3. Clean Up Before Committing
|
|
67
|
+
|
|
68
|
+
RaftStack creates `.backup` files for any existing configs it modifies. Remove these before your first commit:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Find and review backup files
|
|
72
|
+
find . -name "*.backup" -type f
|
|
73
|
+
|
|
74
|
+
# Remove backup files after reviewing
|
|
75
|
+
find . -name "*.backup" -type f -delete
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 4. Install Dependencies and Commit
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Install new dependencies added by RaftStack
|
|
82
|
+
pnpm install # or npm install / yarn
|
|
83
|
+
|
|
84
|
+
# Stage all changes
|
|
85
|
+
git add .
|
|
86
|
+
|
|
87
|
+
# Use the interactive commit wizard
|
|
88
|
+
pnpm commit
|
|
89
|
+
```
|
|
90
|
+
|
|
43
91
|
## What Gets Generated
|
|
44
92
|
|
|
45
93
|
### Git Hooks (via Husky)
|
|
@@ -77,6 +125,29 @@ The wizard will:
|
|
|
77
125
|
| `CONTRIBUTING.md` | Developer contribution guide |
|
|
78
126
|
| `.github/QUICK_REFERENCE.md` | One-page workflow cheat sheet for developers |
|
|
79
127
|
|
|
128
|
+
## Package Manager Support
|
|
129
|
+
|
|
130
|
+
RaftStack automatically detects and adapts to your package manager of choice:
|
|
131
|
+
|
|
132
|
+
| Package Manager | Detection Method | Lockfile |
|
|
133
|
+
|----------------|------------------|----------|
|
|
134
|
+
| **npm** | `package-lock.json` | `package-lock.json` |
|
|
135
|
+
| **pnpm** | `pnpm-lock.yaml` | `pnpm-lock.yaml` |
|
|
136
|
+
| **Yarn Classic (1.x)** | `yarn.lock` | `yarn.lock` |
|
|
137
|
+
| **Yarn Berry (2+)** | `yarn.lock` + `packageManager` field | `yarn.lock` |
|
|
138
|
+
|
|
139
|
+
**Auto-Detection:**
|
|
140
|
+
- RaftStack scans for lockfiles in your project root
|
|
141
|
+
- Priority order: pnpm > Yarn > npm
|
|
142
|
+
- For Yarn, the version is determined from the `packageManager` field in `package.json`
|
|
143
|
+
- If no lockfile is found, you'll be prompted to select your preferred package manager
|
|
144
|
+
|
|
145
|
+
**What Gets Customized:**
|
|
146
|
+
- All generated hooks use the correct package manager commands (`npx` vs `pnpm dlx` vs `yarn dlx`)
|
|
147
|
+
- GitHub workflows use appropriate install commands (`npm ci` vs `pnpm install --frozen-lockfile` vs `yarn install --immutable`)
|
|
148
|
+
- pnpm projects automatically include the `pnpm/action-setup` action in CI workflows
|
|
149
|
+
- Documentation shows the right commands for your package manager
|
|
150
|
+
|
|
80
151
|
## Commands
|
|
81
152
|
|
|
82
153
|
### `raftstack init`
|
|
@@ -116,19 +187,11 @@ Use during pilot rollout or ongoing maintenance to track team adoption.
|
|
|
116
187
|
|
|
117
188
|
## After Setup
|
|
118
189
|
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
pnpm install
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
2. **Make commits using the interactive wizard:**
|
|
125
|
-
```bash
|
|
126
|
-
pnpm commit
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
3. **Review the generated configuration** and customize as needed.
|
|
190
|
+
See [Getting Started](#getting-started) for the complete setup workflow. Once configured:
|
|
130
191
|
|
|
131
|
-
|
|
192
|
+
- **Make commits** using `pnpm commit` for the interactive wizard
|
|
193
|
+
- **Set up branch protection** on GitHub (see `.github/BRANCH_PROTECTION_SETUP.md`)
|
|
194
|
+
- **Review generated configs** and customize as needed
|
|
132
195
|
|
|
133
196
|
## Commit Convention
|
|
134
197
|
|