@archon-research/uikit-cli 0.1.0-dev25004766367 → 0.2.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 +33 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,53 +1,62 @@
|
|
|
1
1
|
# @archon-research/uikit-cli
|
|
2
2
|
|
|
3
|
-
CLI for
|
|
3
|
+
CLI tool for local package linking during active development with consumer repositories.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
Once published to GitHub Packages, install globally:
|
|
8
|
-
|
|
9
7
|
```bash
|
|
10
|
-
npm install -
|
|
8
|
+
npm install --save-dev @archon-research/uikit-cli
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Link uikit packages into a consumer repository
|
|
14
|
+
|
|
15
|
+
From your consumer repository:
|
|
14
16
|
|
|
15
17
|
```bash
|
|
16
|
-
|
|
17
|
-
npm link
|
|
18
|
+
npm run uikit:link
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
This command links all `@archon-research/*` packages from your local uikit monorepo into your consumer project, allowing you to develop packages and see changes immediately.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
Add this script to your consumer's `package.json`:
|
|
23
24
|
|
|
24
|
-
```
|
|
25
|
-
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"scripts": {
|
|
28
|
+
"uikit:link": "uikit-cli link",
|
|
29
|
+
"uikit:unlink": "uikit-cli unlink"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
26
32
|
```
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
### Restore registry versions
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
When co-development is complete, restore published versions from npm:
|
|
31
37
|
|
|
32
38
|
```bash
|
|
33
|
-
uikit
|
|
39
|
+
npm run uikit:unlink
|
|
34
40
|
```
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
## How it works
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
The CLI manages workspace package links by:
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
1. Discovering linked `@archon-research` packages in your local uikit monorepo
|
|
47
|
+
2. Creating file links in your consumer repository's `node_modules`
|
|
48
|
+
3. Reversing the process with `unlink` to restore registry-installed packages
|
|
41
49
|
|
|
42
|
-
|
|
43
|
-
cd my-consumer/src/explorer
|
|
44
|
-
uikit-cli link # auto-detects workspace root and links packages
|
|
45
|
-
```
|
|
50
|
+
The CLI automatically detects the consumer workspace root and all dependent packages, working from any directory within the workspace.
|
|
46
51
|
|
|
47
|
-
##
|
|
52
|
+
## Requirements
|
|
53
|
+
|
|
54
|
+
- Local clone of the uikit monorepo
|
|
55
|
+
- Node.js and npm installed
|
|
56
|
+
|
|
57
|
+
## See also
|
|
48
58
|
|
|
49
|
-
|
|
50
|
-
2. **Discovery**: Queries locally available uikit packages and determines which ones are needed by consumer workspaces
|
|
59
|
+
- [Development guide](../../DEVELOPMENT.md#local-co-development-with-a-consumer-repository) for detailed local development workflow
|
|
51
60
|
3. **Linking**: Uses `npm link` to establish local package resolution
|
|
52
61
|
4. **Graceful fallback**: On unlink, checks if packages are published; if not, keeps local links to prevent breaking changes
|
|
53
62
|
|