@archon-research/uikit-cli 0.1.0 → 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.
Files changed (3) hide show
  1. package/README.md +33 -24
  2. package/dist/cli.js +0 -0
  3. package/package.json +5 -3
package/README.md CHANGED
@@ -1,53 +1,62 @@
1
1
  # @archon-research/uikit-cli
2
2
 
3
- CLI for managing local uikit package linking in consumer workspaces.
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 -g @archon-research/uikit-cli
8
+ npm install --save-dev @archon-research/uikit-cli
11
9
  ```
12
10
 
13
- For development, link locally:
11
+ ## Usage
12
+
13
+ ### Link uikit packages into a consumer repository
14
+
15
+ From your consumer repository:
14
16
 
15
17
  ```bash
16
- cd /path/to/uikit/packages/uikit-cli
17
- npm link
18
+ npm run uikit:link
18
19
  ```
19
20
 
20
- ## Usage
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
- ### Link local uikit packages
23
+ Add this script to your consumer's `package.json`:
23
24
 
24
- ```bash
25
- uikit-cli link
25
+ ```json
26
+ {
27
+ "scripts": {
28
+ "uikit:link": "uikit-cli link",
29
+ "uikit:unlink": "uikit-cli unlink"
30
+ }
31
+ }
26
32
  ```
27
33
 
28
- Automatically detects the consumer workspace root by walking up to the nearest `package.json` with a `workspaces` field. Links all `@archon-research/*` packages that the consumer depends on.
34
+ ### Restore registry versions
29
35
 
30
- ### Unlink local packages (restore registry versions)
36
+ When co-development is complete, restore published versions from npm:
31
37
 
32
38
  ```bash
33
- uikit-cli unlink
39
+ npm run uikit:unlink
34
40
  ```
35
41
 
36
- Attempts to unlink all local uikit packages and restore registered versions. If packages are not yet published, keeps local links in place.
42
+ ## How it works
37
43
 
38
- ### Working from any subdirectory
44
+ The CLI manages workspace package links by:
39
45
 
40
- The CLI works from any directory within a workspace:
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
- ```bash
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
- ## How it works
52
+ ## Requirements
53
+
54
+ - Local clone of the uikit monorepo
55
+ - Node.js and npm installed
56
+
57
+ ## See also
48
58
 
49
- 1. **Auto-detection**: Walks up from current working directory to find the nearest `package.json` with a `workspaces` field
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
 
package/dist/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archon-research/uikit-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "CLI for managing local uikit package linking in consumer workspaces",
6
6
  "scripts": {
@@ -12,7 +12,6 @@
12
12
  "uikit-cli": "./dist/cli.js"
13
13
  },
14
14
  "publishConfig": {
15
- "registry": "https://npm.pkg.github.com",
16
15
  "access": "public"
17
16
  },
18
17
  "devDependencies": {
@@ -21,5 +20,8 @@
21
20
  },
22
21
  "files": [
23
22
  "dist"
24
- ]
23
+ ],
24
+ "repository": {
25
+ "url": "https://github.com/archon-research/uikit"
26
+ }
25
27
  }