portless 0.5.1 → 0.5.2
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 +20 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,26 @@ portless docs.myapp next dev
|
|
|
64
64
|
# tenant2.myapp.localhost:1355 -> myapp
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
### Git Worktrees
|
|
68
|
+
|
|
69
|
+
`portless run` automatically detects git worktrees. When you're in a linked worktree, the branch name is prepended as a subdomain so each worktree gets its own URL without any config changes:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Main worktree (main/master branch) -- no prefix, works normally
|
|
73
|
+
portless run next dev
|
|
74
|
+
# -> http://myapp.localhost:1355
|
|
75
|
+
|
|
76
|
+
# Linked worktree on branch "fix-ui" -- branch name becomes a prefix
|
|
77
|
+
portless run next dev
|
|
78
|
+
# -> http://fix-ui.myapp.localhost:1355
|
|
79
|
+
|
|
80
|
+
# Linked worktree on branch "feature/auth" -- uses last segment
|
|
81
|
+
portless run next dev
|
|
82
|
+
# -> http://auth.myapp.localhost:1355
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This means you can put `portless run` in your `package.json` once and it just works everywhere -- the main checkout uses the plain name, and each worktree gets a unique subdomain. No `--force` needed, no name collisions.
|
|
86
|
+
|
|
67
87
|
### In package.json
|
|
68
88
|
|
|
69
89
|
```json
|
package/dist/cli.js
CHANGED