create-projx 1.3.5 → 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 +56 -8
- package/dist/index.js +2128 -205
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,19 +87,17 @@ cd my-app
|
|
|
87
87
|
npx create-projx@latest update
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
Updates use a 3-tier merge strategy:
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
git
|
|
94
|
-
|
|
95
|
-
git add . && git commit -m "projx: update to vX.X.X" # commit when ready
|
|
96
|
-
```
|
|
92
|
+
1. **Git merge** — if the template merges cleanly with your code, it's auto-committed. Done.
|
|
93
|
+
2. **3-way merge** — if git merge fails, each file is merged individually using `git merge-file`. Your additions (extra deps, env vars, custom config) are preserved alongside template updates. Clean merges are auto-staged; only true conflicts need review.
|
|
94
|
+
3. **Direct copy** — if no merge baseline exists, template files are written directly. You pick which changes to keep via an interactive prompt, and discarded files are automatically added to your skip list.
|
|
97
95
|
|
|
98
96
|
Your custom files (controllers, pages, middleware) are never deleted. Files you created that don't exist in the template are always preserved.
|
|
99
97
|
|
|
100
98
|
### Skip Files
|
|
101
99
|
|
|
102
|
-
|
|
100
|
+
To skip component source files, add `skip` to `.projx-component`:
|
|
103
101
|
|
|
104
102
|
```json
|
|
105
103
|
{
|
|
@@ -109,7 +107,17 @@ If a file keeps getting overwritten on every update, add it to `.projx-component
|
|
|
109
107
|
}
|
|
110
108
|
```
|
|
111
109
|
|
|
112
|
-
|
|
110
|
+
To skip root-level files (docker-compose, README), add `skip` to `.projx`:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"version": "1.3.6",
|
|
115
|
+
"components": ["fastapi", "frontend"],
|
|
116
|
+
"skip": ["docker-compose.yml", "README.md"]
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Skipped files are excluded from template updates.
|
|
113
121
|
|
|
114
122
|
## Options
|
|
115
123
|
|
|
@@ -118,6 +126,11 @@ npx create-projx <name> [options]
|
|
|
118
126
|
npx create-projx init
|
|
119
127
|
npx create-projx add <components...>
|
|
120
128
|
npx create-projx update
|
|
129
|
+
npx create-projx diff
|
|
130
|
+
npx create-projx pin <patterns...>
|
|
131
|
+
npx create-projx unpin <patterns...>
|
|
132
|
+
npx create-projx pin --list
|
|
133
|
+
npx create-projx doctor [--fix]
|
|
121
134
|
|
|
122
135
|
--components <list> Comma-separated: fastapi,fastify,frontend,mobile,e2e,infra
|
|
123
136
|
--no-git Skip git init
|
|
@@ -126,6 +139,41 @@ npx create-projx update
|
|
|
126
139
|
-h, --help Show help
|
|
127
140
|
```
|
|
128
141
|
|
|
142
|
+
### Preview Changes
|
|
143
|
+
|
|
144
|
+
See what `update` would change before applying:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
cd my-app
|
|
148
|
+
npx create-projx diff
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Shows file-by-file analysis: clean updates, files needing merge, user-only changes, and skipped files.
|
|
152
|
+
|
|
153
|
+
### Pin / Unpin Files
|
|
154
|
+
|
|
155
|
+
Skip files from future template updates without editing JSON:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
npx create-projx pin backend/pyproject.toml # skip this file
|
|
159
|
+
npx create-projx pin "backend/src/**" # skip with glob
|
|
160
|
+
npx create-projx unpin backend/pyproject.toml # allow updates again
|
|
161
|
+
npx create-projx pin --list # show all pinned files
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Files inside a component directory are added to that component's `.projx-component` skip list. Root-level files are added to `.projx` skip.
|
|
165
|
+
|
|
166
|
+
### Health Check
|
|
167
|
+
|
|
168
|
+
Diagnose issues with your projx setup:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
npx create-projx doctor # check everything
|
|
172
|
+
npx create-projx doctor --fix # auto-fix what's possible
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Checks: config validity, component markers, baseline ref, stale worktrees, skip pattern coverage.
|
|
176
|
+
|
|
129
177
|
## Rename Component Directories
|
|
130
178
|
|
|
131
179
|
Rename `fastapi/` to `backend/`? Just rename the folder — the `.projx-component` marker file moves with it. The `update` command auto-discovers where each component lives by scanning for these markers. No config changes needed.
|