design-share 0.1.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 +64 -0
- package/bin/design-share.js +8 -0
- package/dist/DesignShare.app/Contents/CodeResources +0 -0
- package/dist/DesignShare.app/Contents/Info.plist +26 -0
- package/dist/DesignShare.app/Contents/MacOS/DesignShare +0 -0
- package/dist/DesignShare.app/Contents/_CodeSignature/CodeResources +115 -0
- package/package.json +18 -0
- package/public/app.js +526 -0
- package/public/index.html +75 -0
- package/public/style.css +435 -0
- package/src/cli.js +246 -0
- package/src/detect.js +76 -0
- package/src/git.js +47 -0
- package/src/menubar.js +48 -0
- package/src/previews.js +240 -0
- package/src/registry.js +42 -0
- package/src/server.js +214 -0
- package/src/state.js +204 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# design-share
|
|
2
|
+
|
|
3
|
+
Live branch previews and pinned comments for design teams who ship code. One command inside your repo puts every designer's branch on a shared board, with live previews and Figma style comments. No accounts, no SaaS, no visible server. Git is the only backend.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npx design-share
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
✓ repo: acme-web (cwd)
|
|
11
|
+
✓ you: Sara (git config)
|
|
12
|
+
✓ previews: npm run dev (auto detected)
|
|
13
|
+
|
|
14
|
+
› dashboard: http://localhost:4400
|
|
15
|
+
share sara/checkout-v2 with the team board? (Y/n)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Why
|
|
19
|
+
|
|
20
|
+
Branches are invisible unless you already think like an engineer. The latest design work lives on a branch, yet finding it requires GitHub, branch names, deployment URLs and tribal knowledge. design-share turns every open branch into something you can see, click and comment on.
|
|
21
|
+
|
|
22
|
+
## What you get
|
|
23
|
+
|
|
24
|
+
* **The board.** A left rail grouped by person shows every shared branch. Clicking one opens its live preview in place.
|
|
25
|
+
* **Previews without checkout.** Opening a teammate's branch silently checks it out into a hidden worktree inside `.git` land and runs the repo's preview command there. Your own working copy is never touched.
|
|
26
|
+
* **Pinned comments.** Click anywhere on a live preview to pin a note. Pins anchor to the exact spot, the viewport and the commit.
|
|
27
|
+
* **A loop that closes itself.** When the author pushes, open pins flag "updated since pin" so "is this fixed?" is never a question. Mark fixed, reply, done.
|
|
28
|
+
* **Zero setup for the team.** Identity comes from git config, the repo from your working directory, the preview command from package.json. The one question that detection may need (how previews run) is asked once per repo and saved to a committed `.design-share.json`.
|
|
29
|
+
|
|
30
|
+
## How it works
|
|
31
|
+
|
|
32
|
+
* Shared state (who shared what, plus every comment) lives in a hidden git ref, `refs/design-share/state`, pushed and fetched through the origin remote the team already uses. Any git host works. Nothing new to run or pay for.
|
|
33
|
+
* Teammates converge automatically: state documents merge by id with last write wins, so two designers commenting at the same time never conflict.
|
|
34
|
+
* Previews run locally on each viewer's machine, so a teammate's preview survives the author closing their laptop.
|
|
35
|
+
|
|
36
|
+
## Commands
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
npx design-share start the board for this repo
|
|
40
|
+
npx design-share share share your current branch with the team board
|
|
41
|
+
npx design-share status show what is running
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Flags: `--port <n>` (default 4400), `--no-open`, `--yes`.
|
|
45
|
+
|
|
46
|
+
## The menu bar app (macOS)
|
|
47
|
+
|
|
48
|
+
The first run offers it, and `npx design-share app` installs it any time. It is a tiny native app (about 1MB, bundled in this package, nothing else to download) that lives in the menu bar:
|
|
49
|
+
|
|
50
|
+
* keeps your board and previews alive after the terminal closes, and brings them back automatically
|
|
51
|
+
* shows every repo's branches with open comment counts, one click from the dashboard
|
|
52
|
+
* badges the icon when teammates pin comments on your shared branches
|
|
53
|
+
* optional launch at login
|
|
54
|
+
|
|
55
|
+
Quitting with Ctrl+C in the terminal is respected as a deliberate stop. Closing the terminal window is treated as an accident, and the app revives the board within seconds.
|
|
56
|
+
|
|
57
|
+
## Honest notes
|
|
58
|
+
* Opening a teammate's branch runs that branch's preview command on your machine, the same trust model as checking it out yourself.
|
|
59
|
+
* Worktree previews borrow the root `node_modules` when possible. Branches that change dependencies may need an install inside `.design-share/worktrees/<branch>`.
|
|
60
|
+
* "Updated since pin" compares commits today. Pixel level diffing is on the roadmap.
|
|
61
|
+
|
|
62
|
+
## Requirements
|
|
63
|
+
|
|
64
|
+
Node 18 or newer, git, and a repo with an origin remote (solo local mode works without one).
|
|
Binary file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleName</key>
|
|
6
|
+
<string>DesignShare</string>
|
|
7
|
+
<key>CFBundleDisplayName</key>
|
|
8
|
+
<string>DesignShare</string>
|
|
9
|
+
<key>CFBundleIdentifier</key>
|
|
10
|
+
<string>com.design-share.menubar</string>
|
|
11
|
+
<key>CFBundleVersion</key>
|
|
12
|
+
<string>0.1.0</string>
|
|
13
|
+
<key>CFBundleShortVersionString</key>
|
|
14
|
+
<string>0.1.0</string>
|
|
15
|
+
<key>CFBundleExecutable</key>
|
|
16
|
+
<string>DesignShare</string>
|
|
17
|
+
<key>CFBundlePackageType</key>
|
|
18
|
+
<string>APPL</string>
|
|
19
|
+
<key>LSMinimumSystemVersion</key>
|
|
20
|
+
<string>13.0</string>
|
|
21
|
+
<key>LSUIElement</key>
|
|
22
|
+
<true/>
|
|
23
|
+
<key>NSHighResolutionCapable</key>
|
|
24
|
+
<true/>
|
|
25
|
+
</dict>
|
|
26
|
+
</plist>
|
|
Binary file
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>files</key>
|
|
6
|
+
<dict/>
|
|
7
|
+
<key>files2</key>
|
|
8
|
+
<dict/>
|
|
9
|
+
<key>rules</key>
|
|
10
|
+
<dict>
|
|
11
|
+
<key>^Resources/</key>
|
|
12
|
+
<true/>
|
|
13
|
+
<key>^Resources/.*\.lproj/</key>
|
|
14
|
+
<dict>
|
|
15
|
+
<key>optional</key>
|
|
16
|
+
<true/>
|
|
17
|
+
<key>weight</key>
|
|
18
|
+
<real>1000</real>
|
|
19
|
+
</dict>
|
|
20
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
21
|
+
<dict>
|
|
22
|
+
<key>omit</key>
|
|
23
|
+
<true/>
|
|
24
|
+
<key>weight</key>
|
|
25
|
+
<real>1100</real>
|
|
26
|
+
</dict>
|
|
27
|
+
<key>^Resources/Base\.lproj/</key>
|
|
28
|
+
<dict>
|
|
29
|
+
<key>weight</key>
|
|
30
|
+
<real>1010</real>
|
|
31
|
+
</dict>
|
|
32
|
+
<key>^version.plist$</key>
|
|
33
|
+
<true/>
|
|
34
|
+
</dict>
|
|
35
|
+
<key>rules2</key>
|
|
36
|
+
<dict>
|
|
37
|
+
<key>.*\.dSYM($|/)</key>
|
|
38
|
+
<dict>
|
|
39
|
+
<key>weight</key>
|
|
40
|
+
<real>11</real>
|
|
41
|
+
</dict>
|
|
42
|
+
<key>^(.*/)?\.DS_Store$</key>
|
|
43
|
+
<dict>
|
|
44
|
+
<key>omit</key>
|
|
45
|
+
<true/>
|
|
46
|
+
<key>weight</key>
|
|
47
|
+
<real>2000</real>
|
|
48
|
+
</dict>
|
|
49
|
+
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
|
50
|
+
<dict>
|
|
51
|
+
<key>nested</key>
|
|
52
|
+
<true/>
|
|
53
|
+
<key>weight</key>
|
|
54
|
+
<real>10</real>
|
|
55
|
+
</dict>
|
|
56
|
+
<key>^.*</key>
|
|
57
|
+
<true/>
|
|
58
|
+
<key>^Info\.plist$</key>
|
|
59
|
+
<dict>
|
|
60
|
+
<key>omit</key>
|
|
61
|
+
<true/>
|
|
62
|
+
<key>weight</key>
|
|
63
|
+
<real>20</real>
|
|
64
|
+
</dict>
|
|
65
|
+
<key>^PkgInfo$</key>
|
|
66
|
+
<dict>
|
|
67
|
+
<key>omit</key>
|
|
68
|
+
<true/>
|
|
69
|
+
<key>weight</key>
|
|
70
|
+
<real>20</real>
|
|
71
|
+
</dict>
|
|
72
|
+
<key>^Resources/</key>
|
|
73
|
+
<dict>
|
|
74
|
+
<key>weight</key>
|
|
75
|
+
<real>20</real>
|
|
76
|
+
</dict>
|
|
77
|
+
<key>^Resources/.*\.lproj/</key>
|
|
78
|
+
<dict>
|
|
79
|
+
<key>optional</key>
|
|
80
|
+
<true/>
|
|
81
|
+
<key>weight</key>
|
|
82
|
+
<real>1000</real>
|
|
83
|
+
</dict>
|
|
84
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
85
|
+
<dict>
|
|
86
|
+
<key>omit</key>
|
|
87
|
+
<true/>
|
|
88
|
+
<key>weight</key>
|
|
89
|
+
<real>1100</real>
|
|
90
|
+
</dict>
|
|
91
|
+
<key>^Resources/Base\.lproj/</key>
|
|
92
|
+
<dict>
|
|
93
|
+
<key>weight</key>
|
|
94
|
+
<real>1010</real>
|
|
95
|
+
</dict>
|
|
96
|
+
<key>^[^/]+$</key>
|
|
97
|
+
<dict>
|
|
98
|
+
<key>nested</key>
|
|
99
|
+
<true/>
|
|
100
|
+
<key>weight</key>
|
|
101
|
+
<real>10</real>
|
|
102
|
+
</dict>
|
|
103
|
+
<key>^embedded\.provisionprofile$</key>
|
|
104
|
+
<dict>
|
|
105
|
+
<key>weight</key>
|
|
106
|
+
<real>20</real>
|
|
107
|
+
</dict>
|
|
108
|
+
<key>^version\.plist$</key>
|
|
109
|
+
<dict>
|
|
110
|
+
<key>weight</key>
|
|
111
|
+
<real>20</real>
|
|
112
|
+
</dict>
|
|
113
|
+
</dict>
|
|
114
|
+
</dict>
|
|
115
|
+
</plist>
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "design-share",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Live branch previews and pinned comments for design teams. Zero config, no server, git is the backend.",
|
|
5
|
+
"keywords": ["design", "preview", "branches", "collaboration", "cli"],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"design-share": "bin/design-share.js"
|
|
10
|
+
},
|
|
11
|
+
"files": ["bin", "src", "public", "dist", "README.md"],
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=18"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"start": "node bin/design-share.js"
|
|
17
|
+
}
|
|
18
|
+
}
|